diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-03-18 16:59:48 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-03-18 16:59:48 +0100 |
| commit | c2a4e2ca5cd8a1b47240390affd43a85d51bef64 (patch) | |
| tree | 0fac530883b6f9cb36fd7a3766361e77b4959bec /src | |
| parent | d4efb77660fb80e208595a2d14207849dd14c103 (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_win32.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 6 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 1 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 1 |
4 files changed, 7 insertions, 3 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 960638887..d7681c96d 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -2342,6 +2342,8 @@ void Fl_WinAPI_Window_Driver::makeWindow() { if (!im_enabled) flImmAssociateContextEx((HWND)x->xid, 0, 0); + + if (w->fullscreen_active()) Fl::handle(FL_FULLSCREEN, w); } 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); } //////////////////////////////////////////////////////////////// diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 384c4a205..c8be2676b 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -397,6 +397,7 @@ void Fl_Wayland_Gl_Window_Driver::resize(int is_a_resize, int W, int H) { Fl_Wayland_Graphics_Driver::p_surface_frame_listener, xid); } wl_egl_window_resize(egl_window, W, H, 0, 0); + wl_surface_set_buffer_scale(xid->wl_surface, s); } /* CONTROL_LEAKING_SUB_GL_WINDOWS if (Fl_Wayland_Window_Driver::driver(pWindow)->subRect()) { diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 8e12091ba..facd462b0 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1603,6 +1603,7 @@ void Fl_Wayland_Window_Driver::makeWindow() previous_floatingtitle = NULL; } } + if (pWindow->fullscreen_active()) Fl::handle(FL_FULLSCREEN, pWindow); } |
