mirror of
https://github.com/fltk/fltk.git
synced 2026-05-26 10:07:06 +08:00
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:
@@ -2342,6 +2342,8 @@ void Fl_WinAPI_Window_Driver::makeWindow() {
|
|||||||
|
|
||||||
if (!im_enabled)
|
if (!im_enabled)
|
||||||
flImmAssociateContextEx((HWND)x->xid, 0, 0);
|
flImmAssociateContextEx((HWND)x->xid, 0, 0);
|
||||||
|
|
||||||
|
if (w->fullscreen_active()) Fl::handle(FL_FULLSCREEN, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -2474,8 +2474,8 @@ void Fl_X11_Window_Driver::fullscreen_on() {
|
|||||||
show();
|
show();
|
||||||
/* We want to grab the window, not a widget, so we cannot use Fl::grab */
|
/* 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);
|
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) {
|
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();
|
hide();
|
||||||
resize(X,Y,W,H);
|
resize(X,Y,W,H);
|
||||||
show();
|
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()) {
|
if (win->fullscreen_active() && !Fl_X11_Screen_Driver::ewmh_supported()) {
|
||||||
XGrabKeyboard(fl_display, xp->xid, 1, GrabModeAsync, GrabModeAsync, fl_event_time);
|
XGrabKeyboard(fl_display, xp->xid, 1, GrabModeAsync, GrabModeAsync, fl_event_time);
|
||||||
}
|
}
|
||||||
|
if (win->fullscreen_active()) Fl::handle(FL_FULLSCREEN, win);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -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);
|
Fl_Wayland_Graphics_Driver::p_surface_frame_listener, xid);
|
||||||
}
|
}
|
||||||
wl_egl_window_resize(egl_window, W, H, 0, 0);
|
wl_egl_window_resize(egl_window, W, H, 0, 0);
|
||||||
|
wl_surface_set_buffer_scale(xid->wl_surface, s);
|
||||||
}
|
}
|
||||||
/* CONTROL_LEAKING_SUB_GL_WINDOWS
|
/* CONTROL_LEAKING_SUB_GL_WINDOWS
|
||||||
if (Fl_Wayland_Window_Driver::driver(pWindow)->subRect()) {
|
if (Fl_Wayland_Window_Driver::driver(pWindow)->subRect()) {
|
||||||
|
|||||||
@@ -1603,6 +1603,7 @@ void Fl_Wayland_Window_Driver::makeWindow()
|
|||||||
previous_floatingtitle = NULL;
|
previous_floatingtitle = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (pWindow->fullscreen_active()) Fl::handle(FL_FULLSCREEN, pWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user