mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
win32: Fix size or style changes during fullscreen
When we're fullscreen we should update the cached hints, and we should not apply the normal hints to the style. This fixes bug #516822
This commit is contained in:
parent
9c575532fd
commit
8c9963f9c3
@ -46,6 +46,15 @@ static void gdk_window_impl_win32_finalize (GObject *object);
|
||||
static gpointer parent_class = NULL;
|
||||
static GSList *modal_window_stack = NULL;
|
||||
|
||||
typedef struct _FullscreenInfo FullscreenInfo;
|
||||
|
||||
struct _FullscreenInfo
|
||||
{
|
||||
RECT r;
|
||||
guint hint_flags;
|
||||
LONG style;
|
||||
};
|
||||
|
||||
static void update_style_bits (GdkWindow *window);
|
||||
static gboolean _gdk_window_get_functions (GdkWindow *window,
|
||||
GdkWMFunction *functions);
|
||||
@ -1831,6 +1840,7 @@ gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
GdkWindowHints geom_mask)
|
||||
{
|
||||
GdkWindowImplWin32 *impl;
|
||||
FullscreenInfo *fi;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@ -1842,7 +1852,11 @@ gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
|
||||
|
||||
impl->hint_flags = geom_mask;
|
||||
fi = g_object_get_data (G_OBJECT (window), "fullscreen-info");
|
||||
if (fi)
|
||||
fi->hint_flags = geom_mask;
|
||||
else
|
||||
impl->hint_flags = geom_mask;
|
||||
impl->hints = *geometry;
|
||||
|
||||
if (geom_mask & GDK_HINT_POS)
|
||||
@ -2892,6 +2906,9 @@ update_style_bits (GdkWindow *window)
|
||||
gboolean all;
|
||||
RECT rect, before, after;
|
||||
|
||||
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
return;
|
||||
|
||||
old_style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
|
||||
old_exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
@ -3087,7 +3104,7 @@ gboolean
|
||||
_gdk_window_get_functions (GdkWindow *window,
|
||||
GdkWMFunction *functions)
|
||||
{
|
||||
GdkWMDecoration* functions_set;
|
||||
GdkWMFunction* functions_set;
|
||||
|
||||
functions_set = g_object_get_qdata (G_OBJECT (window), get_functions_quark ());
|
||||
if (functions_set)
|
||||
@ -3323,15 +3340,6 @@ gdk_window_unmaximize (GdkWindow *window)
|
||||
0);
|
||||
}
|
||||
|
||||
typedef struct _FullscreenInfo FullscreenInfo;
|
||||
|
||||
struct _FullscreenInfo
|
||||
{
|
||||
RECT r;
|
||||
guint hint_flags;
|
||||
LONG style;
|
||||
};
|
||||
|
||||
void
|
||||
gdk_window_fullscreen (GdkWindow *window)
|
||||
{
|
||||
@ -3409,7 +3417,7 @@ gdk_window_unfullscreen (GdkWindow *window)
|
||||
|
||||
g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
|
||||
g_free (fi);
|
||||
|
||||
update_style_bits (window);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user