From c2a4e2ca5cd8a1b47240390affd43a85d51bef64 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:59:48 +0100 Subject: Fix "Inconsistent FL_FULLSCREEN when creating full-screen window" (#1225) The commit has all platforms send the FL_FULLSCREEN event when a window is created fullscreen. --- src/Fl_x.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Fl_x.cxx') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 69db31b8c..81a6916d0 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -2474,8 +2474,8 @@ void Fl_X11_Window_Driver::fullscreen_on() { show(); /* We want to grab the window, not a widget, so we cannot use Fl::grab */ XGrabKeyboard(fl_display, fl_xid(pWindow), 1, GrabModeAsync, GrabModeAsync, fl_event_time); - Fl::handle(FL_FULLSCREEN, pWindow); } + Fl::handle(FL_FULLSCREEN, pWindow); } void Fl_X11_Window_Driver::fullscreen_off(int X, int Y, int W, int H) { @@ -2487,8 +2487,8 @@ void Fl_X11_Window_Driver::fullscreen_off(int X, int Y, int W, int H) { hide(); resize(X,Y,W,H); show(); - Fl::handle(FL_FULLSCREEN, pWindow); } + Fl::handle(FL_FULLSCREEN, pWindow); } @@ -2819,7 +2819,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) if (win->fullscreen_active() && !Fl_X11_Screen_Driver::ewmh_supported()) { XGrabKeyboard(fl_display, xp->xid, 1, GrabModeAsync, GrabModeAsync, fl_event_time); } - + if (win->fullscreen_active()) Fl::handle(FL_FULLSCREEN, win); } //////////////////////////////////////////////////////////////// -- cgit v1.2.3