[gtk/wip/matthiasc/popup5: 174/187] win32: Set the surface type
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 174/187] win32: Set the surface type
- Date: Thu, 23 May 2019 11:08:11 +0000 (UTC)
commit 77b7641fb156e5ee431226550031bb548738a021
Author: Matthias Clasen <mclasen redhat com>
Date: Tue May 21 23:41:00 2019 +0000
win32: Set the surface type
This is copying some code from the corresponding
create_surface implementations of the other backends.
gdk/win32/gdksurface-win32.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 6b3d012db4..c0eeddfeee 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -484,6 +484,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
RECT rect;
GdkWin32Surface *impl;
GdkWin32Display *display_win32;
+ GdkSurface *surface;
const gchar *title;
wchar_t *wtitle;
gint window_width, window_height;
@@ -513,6 +514,13 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
"frame-clock", frame_clock,
NULL);
+ surface = GDK_SURFACE (impl);
+ surface->surface_type = surface_type;
+ surface->x = x;
+ surface->y = y;
+ surface->width = width;
+ surface->height = height;
+
impl->layered = FALSE;
impl->layered_opacity = 1.0;
@@ -608,7 +616,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
hparent,
NULL,
_gdk_dll_hinstance,
- GDK_SURFACE (impl));
+ surface);
impl->handle = hwndNew;
GetWindowRect (hwndNew, &rect);
@@ -638,8 +646,8 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
GDK_NOTE (MISC, g_print ("... \"%s\" %dx%d@%+d%+d %p = %p\n",
title,
window_width, window_height,
- GDK_SURFACE (impl)->x - offset_x,
- GDK_SURFACE (impl)->y - offset_y,
+ surface->x - offset_x,
+ surface->y - offset_y,
hparent,
hwndNew));
@@ -652,7 +660,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
return NULL;
}
- _gdk_win32_surface_enable_transparency (GDK_SURFACE (impl));
+ _gdk_win32_surface_enable_transparency (surface);
g_signal_connect (frame_clock,
"after-paint",
@@ -661,7 +669,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
g_object_unref (frame_clock);
- return GDK_SURFACE (impl);
+ return surface;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]