From 8a80e4f6c044a0e632400a614bb678fecc721b3b Mon Sep 17 00:00:00 2001 From: K D Hedger Date: Tue, 14 Feb 2023 14:22:19 +0000 Subject: [PATCH] fullscreen tweak --- LFSWM2/LFSWM2/src/clientClass.cpp | 11 ++++++----- LFSWM2/LFSWM2/src/clientClass.h | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/LFSWM2/LFSWM2/src/clientClass.cpp b/LFSWM2/LFSWM2/src/clientClass.cpp index be6c319..0eba01d 100644 --- a/LFSWM2/LFSWM2/src/clientClass.cpp +++ b/LFSWM2/LFSWM2/src/clientClass.cpp @@ -316,9 +316,11 @@ void LFSWM2_clientClass::LFSWM2_fullscreenWindow(void) { if(this->isFullscreen==true) { - XMoveResizeWindow(this->mainClass->display,this->frameWindow,this->framePreMaxRect.x,this->framePreMaxRect.y,this->framePreMaxRect.width,this->framePreMaxRect.height); - XMoveResizeWindow(this->mainClass->display,this->contentWindow,this->clientPreMaxRect.x,this->clientPreMaxRect.y,this->clientPreMaxRect.width,this->clientPreMaxRect.height); + XMoveResizeWindow(this->mainClass->display,this->frameWindow,this->framePreFSRect.x,this->framePreFSRect.y,this->framePreFSRect.width,this->framePreFSRect.height); + XMoveResizeWindow(this->mainClass->display,this->contentWindow,this->clientPreFSRect.x,this->clientPreFSRect.y,this->clientPreFSRect.width,this->clientPreFSRect.height); this->isFullscreen=false; + this->setWindowRects(); + this->adjustContentWindow(); } else { @@ -328,8 +330,8 @@ void LFSWM2_clientClass::LFSWM2_fullscreenWindow(void) geometryStruct mg={this->mainClass->monitors.at(j).x,this->mainClass->monitors.at(j).y,(unsigned)this->mainClass->monitors.at(j).width,(unsigned)this->mainClass->monitors.at(j).height,0}; if(this->mainClass->lfstkLib->LFSTK_pointInRect(&fp,&mg)) { - this->framePreMaxRect=this->mainClass->mainWindowClass->LFSWM2_getWindowRect(this->frameWindow,this->mainClass->rootWindow,false); - this->clientPreMaxRect=this->mainClass->mainWindowClass->LFSWM2_getWindowRect(this->contentWindow,this->mainClass->rootWindow,false); + this->framePreFSRect=this->mainClass->mainWindowClass->LFSWM2_getWindowRect(this->frameWindow,this->mainClass->rootWindow,false); + this->clientPreFSRect=this->mainClass->mainWindowClass->LFSWM2_getWindowRect(this->contentWindow,this->mainClass->rootWindow,false); XMoveResizeWindow(this->mainClass->display,this->frameWindow,this->mainClass->monitors.at(j).x,this->mainClass->monitors.at(j).y,this->mainClass->monitors.at(j).width,this->mainClass->monitors.at(j).height); XSync(this->mainClass->display,false); this->setWindowRects(true); @@ -338,7 +340,6 @@ void LFSWM2_clientClass::LFSWM2_fullscreenWindow(void) } this->isFullscreen=true; } - this->setWindowRects(); } void LFSWM2_clientClass::LFSWM2_maxWindow(void) diff --git a/LFSWM2/LFSWM2/src/clientClass.h b/LFSWM2/LFSWM2/src/clientClass.h index 2ddab1a..f728f72 100644 --- a/LFSWM2/LFSWM2/src/clientClass.h +++ b/LFSWM2/LFSWM2/src/clientClass.h @@ -91,6 +91,9 @@ class LFSWM2_clientClass bool buttonDown=false; int sx=0; int sy=0; + rectStructure clientPreFSRect; + rectStructure framePreFSRect; + void drawMouseEnter(Window id,Pixmap pm,controlData data); bool doResizeDraggers(XEvent *e); void setWindowRects(bool resize=true);