[gtk/present-toplevel-2] more win32 build fixes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel-2] more win32 build fixes
- Date: Fri, 13 Mar 2020 00:13:19 +0000 (UTC)
commit 1f91de9ee37670c512257772563f03d57ff9effd
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 12 19:53:29 2020 -0400
more win32 build fixes
gdk/win32/gdksurface-win32.c | 52 ++++++++++++++++++++++++--------------------
1 file changed, 28 insertions(+), 24 deletions(-)
---
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index f16dd2a2f8..4d6e2b942b 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -214,7 +214,7 @@ _gdk_win32_get_window_client_area_rect (GdkSurface *window,
{
gint x, y, width, height;
- gdk_surface_get_position (window, &x, &y);
+ x = y = 0;
width = gdk_surface_get_width (window);
height = gdk_surface_get_height (window);
rect->left = x * scale;
@@ -680,6 +680,10 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
return surface;
}
+static void
+gdk_win32_surface_set_transient_for (GdkSurface *window,
+ GdkSurface *parent);
+
static void
gdk_win32_surface_destroy (GdkSurface *window,
gboolean foreign_destroy)
@@ -702,13 +706,13 @@ gdk_win32_surface_destroy (GdkSurface *window,
while (surface->transient_children != NULL)
{
GdkSurface *child = surface->transient_children->data;
- gdk_surface_set_transient_for (child, NULL);
+ gdk_win32_surface_set_transient_for (child, NULL);
}
/* Remove ourself from our transient owner */
if (surface->transient_owner != NULL)
{
- gdk_surface_set_transient_for (window, NULL);
+ gdk_win32_surface_set_transient_for (window, NULL);
}
if (!foreign_destroy)
@@ -826,6 +830,9 @@ adjust_for_gravity_hints (GdkSurface *window,
}
}
+static void
+gdk_win32_surface_fullscreen (GdkSurface *window);
+
static void
show_window_internal (GdkSurface *window,
gboolean already_mapped,
@@ -1017,7 +1024,7 @@ show_window_internal (GdkSurface *window,
if (window->state & GDK_SURFACE_STATE_FULLSCREEN)
{
- gdk_surface_fullscreen (window);
+ gdk_win32_surface_fullscreen (window);
}
else if (window->state & GDK_SURFACE_STATE_MAXIMIZED)
{
@@ -1152,7 +1159,7 @@ gdk_win32_surface_do_move (GdkSurface *window,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
-static void
+void
gdk_win32_surface_resize (GdkSurface *window,
gint width, gint height)
{
@@ -1460,10 +1467,9 @@ get_effective_window_decorations (GdkSurface *window,
{
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
- if (gdk_surface_get_decorations (window, decoration))
- return TRUE;
+ *decoration = 0;
- if (window->surface_type != GDK_SURFACE_TOPLEVEL)
+ if (!GDK_IS_TOPLEVEL (window))
{
return FALSE;
}
@@ -1847,7 +1853,6 @@ gdk_surface_win32_get_device_state (GdkSurface *window,
GDK_DEVICE_GET_CLASS (device)->query_state (device, window,
&child,
- NULL, NULL,
x, y, mask);
return (child != NULL);
}
@@ -2538,7 +2543,7 @@ snap_up (GdkSurface *window)
stash_window (window, impl);
maxysize = GetSystemMetrics (SM_CYVIRTUALSCREEN) / impl->surface_scale;
- gdk_surface_get_position (window, &x, &y);
+ x = y = 0;
width = gdk_surface_get_width (window);
y = 0;
@@ -2609,6 +2614,11 @@ snap_right (GdkSurface *window,
rect.width, rect.height);
}
+static void
+gdk_win32_surface_maximize (GdkSurface *window);
+static void
+gdk_win32_surface_unmaximize (GdkSurface *window);
+
void
_gdk_win32_surface_handle_aerosnap (GdkSurface *window,
GdkWin32AeroSnapCombo combo)
@@ -2643,14 +2653,14 @@ _gdk_win32_surface_handle_aerosnap (GdkSurface *window,
if (!maximized)
{
unsnap (window, monitor);
- gdk_surface_maximize (window);
+ gdk_win32_surface_maximize (window);
}
break;
case GDK_WIN32_AEROSNAP_COMBO_DOWN:
case GDK_WIN32_AEROSNAP_COMBO_SHIFTDOWN:
if (maximized)
{
- gdk_surface_unmaximize (window);
+ gdk_win32_surface_unmaximize (window);
unsnap (window, monitor);
}
else if (halfsnapped)
@@ -2660,7 +2670,7 @@ _gdk_win32_surface_handle_aerosnap (GdkSurface *window,
break;
case GDK_WIN32_AEROSNAP_COMBO_LEFT:
if (maximized)
- gdk_surface_unmaximize (window);
+ gdk_win32_surface_unmaximize (window);
if (impl->snap_state == GDK_WIN32_AEROSNAP_STATE_UNDETERMINED ||
impl->snap_state == GDK_WIN32_AEROSNAP_STATE_FULLUP)
@@ -2682,7 +2692,7 @@ _gdk_win32_surface_handle_aerosnap (GdkSurface *window,
break;
case GDK_WIN32_AEROSNAP_COMBO_RIGHT:
if (maximized)
- gdk_surface_unmaximize (window);
+ gdk_win32_surface_unmaximize (window);
if (impl->snap_state == GDK_WIN32_AEROSNAP_STATE_UNDETERMINED ||
impl->snap_state == GDK_WIN32_AEROSNAP_STATE_FULLUP)
@@ -2746,7 +2756,7 @@ apply_snap (GdkSurface *window,
break;
case GDK_WIN32_AEROSNAP_STATE_MAXIMIZE:
unsnap (window, monitor);
- gdk_surface_maximize (window);
+ gdk_win32_surface_maximize (window);
break;
case GDK_WIN32_AEROSNAP_STATE_HALFLEFT:
unsnap (window, monitor);
@@ -3219,7 +3229,7 @@ update_fullup_indicator (GdkSurface *window,
impl = GDK_WIN32_SURFACE (window);
maxysize = GetSystemMetrics (SM_CYVIRTUALSCREEN);
- gdk_surface_get_position (window, &to.x, &to.y);
+ to.x = to.y = 0;
to.width = gdk_surface_get_width (window);
to.height = gdk_surface_get_height (window);
@@ -3344,7 +3354,7 @@ start_indicator (GdkSurface *window,
gdk_monitor_get_workarea (monitor, &workarea);
maxysize = GetSystemMetrics (SM_CYVIRTUALSCREEN) / impl->surface_scale;
- gdk_surface_get_position (window, &start_size.x, &start_size.y);
+ start_size.x = start_size.y = 0;
start_size.width = gdk_surface_get_width (window);
start_size.height = gdk_surface_get_height (window);
@@ -5406,13 +5416,7 @@ gdk_win32_toplevel_present (GdkToplevel *toplevel,
gdk_win32_surface_unmaximize (surface);
if (gdk_toplevel_layout_get_fullscreen (layout))
- {
- GdkMonitor *monitor = gdk_toplevel_layout_get_fullscreen_monitor (layout);
- if (monitor)
- gdk_win32_surface_fullscreen_on_monitor (surface, monitor);
- else
- gdk_win32_surface_fullscreen (surface);
- }
+ gdk_win32_surface_fullscreen (surface);
else
gdk_win32_surface_unfullscreen (surface);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]