/* ======================================================================== * * Filename: WToplevel.cpp * Description: W Compositor WToplevel class definitions * GitHub Repo: https://github.com/diego-est/womp * Author: Diego A. Estrada Rivera * License: GPL-3.0 * * ======================================================================== */ #include "WToplevel.hpp" #include "WSurface.hpp" #include "prelude.hpp" WToplevel::WToplevel(Handle params) noexcept : LToplevelRole(params) { } void WToplevel::configureRequest() noexcept { // request the client to draw its own window decorations setDecorationMode(ClientSide); // activates the toplevel with size (0, 0) so that the client can decide // the size configure(LSize(0, 0), pendingStates() | LToplevelRole::Activated); } void WToplevel::setMinimizedRequest() noexcept { if (not fullscreen()) surf()->setMinimized(true); }