My omnium-gatherom of scripts and source code.
at main 32 lines 927 B view raw
1/* ======================================================================== 2 * 3 * Filename: WToplevel.cpp 4 * Description: W Compositor WToplevel class definitions 5 * GitHub Repo: https://github.com/diego-est/womp 6 * Author: Diego A. Estrada Rivera 7 * License: GPL-3.0 8 * 9 * ======================================================================== */ 10#include "WToplevel.hpp" 11#include "WSurface.hpp" 12#include "prelude.hpp" 13 14WToplevel::WToplevel(Handle<Params> params) noexcept : LToplevelRole(params) 15{ 16} 17 18void WToplevel::configureRequest() noexcept 19{ 20 // request the client to draw its own window decorations 21 setDecorationMode(ClientSide); 22 23 // activates the toplevel with size (0, 0) so that the client can decide 24 // the size 25 configure(LSize(0, 0), pendingStates() | LToplevelRole::Activated); 26} 27 28void WToplevel::setMinimizedRequest() noexcept 29{ 30 if (not fullscreen()) 31 surf()->setMinimized(true); 32}