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.
This commit is contained in:
ManoloFLTK 2025-03-18 16:59:48 +01:00
parent d4efb77660
commit c2a4e2ca5c
4 changed files with 7 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);
}
////////////////////////////////////////////////////////////////

View File

@ -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()) {

View File

@ -1603,6 +1603,7 @@ void Fl_Wayland_Window_Driver::makeWindow()
previous_floatingtitle = NULL;
}
}
if (pWindow->fullscreen_active()) Fl::handle(FL_FULLSCREEN, pWindow);
}