summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-11-01 15:43:18 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-11-01 15:43:18 +0100
commit818e2b77d141574a8ef8cf50bbe33241206a2ee9 (patch)
tree891dd586a1a8bce20f4b640f6bd98f337c838e0e /src/drivers/WinAPI
parent34f465add2c95aaba012d0f6444ad7478c420327 (diff)
Wayland: Fix issue in maximization of a borderless window (#1099)
Also fixes scenarios mixing fullscreen and maximization: - maximize - set fullscreen - unset fullscreen - un-maximize with and without window border.
Diffstat (limited to 'src/drivers/WinAPI')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
index f6ad0bcad..b930719a6 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
@@ -610,6 +610,7 @@ void Fl_WinAPI_Window_Driver::fullscreen_off(int X, int Y, int W, int H) {
scaledW += bx*2;
scaledH += by*2+bt;
SetWindowLong(fl_xid(pWindow), GWL_STYLE, style);
+ if (pWindow->maximize_active()) return this->maximize();
SetWindowPos(fl_xid(pWindow), 0, scaledX, scaledY, scaledW, scaledH,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED);
Fl::handle(FL_FULLSCREEN, pWindow);
@@ -617,10 +618,12 @@ void Fl_WinAPI_Window_Driver::fullscreen_off(int X, int Y, int W, int H) {
void Fl_WinAPI_Window_Driver::maximize() {
+ if (!border()) return Fl_Window_Driver::maximize();
ShowWindow(fl_xid(pWindow), SW_SHOWMAXIMIZED);
}
void Fl_WinAPI_Window_Driver::un_maximize() {
+ if (!border()) return Fl_Window_Driver::un_maximize();
ShowWindow(fl_xid(pWindow), SW_SHOWNORMAL);
}