summaryrefslogtreecommitdiff
path: root/src/Fl_Window_fullscreen.cxx
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/Fl_Window_fullscreen.cxx
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/Fl_Window_fullscreen.cxx')
-rw-r--r--src/Fl_Window_fullscreen.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Fl_Window_fullscreen.cxx b/src/Fl_Window_fullscreen.cxx
index f6919f87c..e464a9fba 100644
--- a/src/Fl_Window_fullscreen.cxx
+++ b/src/Fl_Window_fullscreen.cxx
@@ -37,10 +37,12 @@ void Fl_Window::border(int b) {
*/
void Fl_Window::fullscreen() {
if (!is_resizable()) return;
- no_fullscreen_x = x();
- no_fullscreen_y = y();
- no_fullscreen_w = w();
- no_fullscreen_h = h();
+ if (!maximize_active()) {
+ no_fullscreen_x = x();
+ no_fullscreen_y = y();
+ no_fullscreen_w = w();
+ no_fullscreen_h = h();
+ }
if (shown() && !(flags() & Fl_Widget::FULLSCREEN)) {
pWindowDriver->fullscreen_on();
} else {
@@ -54,7 +56,8 @@ void Fl_Window::fullscreen_off(int X,int Y,int W,int H) {
} else {
clear_flag(FULLSCREEN);
}
- no_fullscreen_x = no_fullscreen_y = no_fullscreen_w = no_fullscreen_h = 0;
+ if (!maximize_active())
+ no_fullscreen_x = no_fullscreen_y = no_fullscreen_w = no_fullscreen_h = 0;
}
void Fl_Window::fullscreen_off() {