forked from AuroraMiddleware/gtk
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).
This commit is contained in:
parent
11fdde0b8f
commit
6ab565b84a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user