[gtk/wip/matthiasc/popup5: 145/145] GDK W32: Adjust to new popup surfaces
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 145/145] GDK W32: Adjust to new popup surfaces
- Date: Sun, 26 May 2019 19:13:54 +0000 (UTC)
commit d6e17e3b8155e02f6ea694820383b5b7d73a1f6f
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sun May 26 15:36:03 2019 +0000
GDK W32: Adjust to new popup surfaces
1) Handle GDK_SURFACE_POPUP in RegisterGdkClass()
(for now pretend it's the same as GDK_SURFACE_TOPLEVEL)
2) Remove useless code from GDK_SURFACE_TOPLEVEL case in _gdk_win32_display_create_surface()
(now there's just GDK_SURFACE_TOPLEVEL there, no need for a type check)
3) Have a separate case for GDK_SURFACE_POPUP and ensure that
it doesn't get WS_CHILDWINDOW (and neither should GDK_SURFACE_TEMP).
gdk/win32/gdksurface-win32.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index bad6006021..5ccc7525e9 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -401,6 +401,7 @@ RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint)
switch (wtype)
{
case GDK_SURFACE_TOPLEVEL:
+ case GDK_SURFACE_POPUP:
/* MSDN: CS_OWNDC is needed for OpenGL contexts */
wcl.style |= CS_OWNDC;
if (0 == klassTOPLEVEL)
@@ -539,19 +540,22 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
hparent = GetDesktopWindow ();
}
/* MSDN: We need WS_CLIPCHILDREN and WS_CLIPSIBLINGS for GL Context Creation */
- if (surface_type == GDK_SURFACE_TOPLEVEL)
- dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
- else
- dwStyle = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION | WS_THICKFRAME | WS_CLIPCHILDREN;
+ dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
offset_x = _gdk_offset_x;
offset_y = _gdk_offset_y;
break;
case GDK_SURFACE_POPUP:
+ dwStyle = WS_POPUP;
+ dwStyle |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
+ offset_x = _gdk_offset_x;
+ offset_y = _gdk_offset_y;
+ break;
+
case GDK_SURFACE_TEMP:
/* A temp window is not necessarily a top level window */
- dwStyle = parent == NULL ? WS_POPUP : WS_CHILDWINDOW;
+ dwStyle = WS_POPUP;
dwStyle |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
dwExStyle |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
offset_x = _gdk_offset_x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]