Print debugging output only if asked for, not always.

2005-03-16  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
	debugging output only if asked for, not always.

	* gdk/win32/*.c: Use the %+d%+d format for coordinate pairs in
	debugging printout instead of +%d+%d. Misc other additions and
	cosmetic improvements to debugging printouts. Use API_CALL() and
	GDI_CALL() macros in more places.

	* gdk/win32/gdkwindow-win32.c (gdk_window_move, gdk_window_resize,
	gdk_window_move_resize): To detect child windows, check whether
	the real parent is not the desktop window, instead of relying on
	the GDK window type being GDK_WINDOW_CHILD. Foreign GtkPlug
	windows have a GDK window type GDK_WINDOW_FOREIGN, but are still
	de facto child windows.
This commit is contained in:
Tor Lillqvist 2005-03-16 01:38:57 +00:00 committed by Tor Lillqvist
parent 1b2584a8ac
commit df9768cf3a
16 changed files with 269 additions and 185 deletions

View File

@ -1,3 +1,20 @@
2005-03-16 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
debugging output only if asked for, not always.
* gdk/win32/*.c: Use the %+d%+d format for coordinate pairs in
debugging printout instead of +%d+%d. Misc other additions and
cosmetic improvements to debugging printouts. Use API_CALL() and
GDI_CALL() macros in more places.
* gdk/win32/gdkwindow-win32.c (gdk_window_move, gdk_window_resize,
gdk_window_move_resize): To detect child windows, check whether
the real parent is not the desktop window, instead of relying on
the GDK window type being GDK_WINDOW_CHILD. Foreign GtkPlug
windows have a GDK window type GDK_WINDOW_FOREIGN, but are still
de facto child windows.
2005-03-15 Matthias Clasen <mclasen@redhat.com> 2005-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an * gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an

View File

@ -1,3 +1,20 @@
2005-03-16 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
debugging output only if asked for, not always.
* gdk/win32/*.c: Use the %+d%+d format for coordinate pairs in
debugging printout instead of +%d+%d. Misc other additions and
cosmetic improvements to debugging printouts. Use API_CALL() and
GDI_CALL() macros in more places.
* gdk/win32/gdkwindow-win32.c (gdk_window_move, gdk_window_resize,
gdk_window_move_resize): To detect child windows, check whether
the real parent is not the desktop window, instead of relying on
the GDK window type being GDK_WINDOW_CHILD. Foreign GtkPlug
windows have a GDK window type GDK_WINDOW_FOREIGN, but are still
de facto child windows.
2005-03-15 Matthias Clasen <mclasen@redhat.com> 2005-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an * gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an

View File

@ -1,3 +1,20 @@
2005-03-16 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
debugging output only if asked for, not always.
* gdk/win32/*.c: Use the %+d%+d format for coordinate pairs in
debugging printout instead of +%d+%d. Misc other additions and
cosmetic improvements to debugging printouts. Use API_CALL() and
GDI_CALL() macros in more places.
* gdk/win32/gdkwindow-win32.c (gdk_window_move, gdk_window_resize,
gdk_window_move_resize): To detect child windows, check whether
the real parent is not the desktop window, instead of relying on
the GDK window type being GDK_WINDOW_CHILD. Foreign GtkPlug
windows have a GDK window type GDK_WINDOW_FOREIGN, but are still
de facto child windows.
2005-03-15 Matthias Clasen <mclasen@redhat.com> 2005-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an * gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an

View File

@ -107,8 +107,7 @@ gdk_colormap_finalize (GObject *object)
GdkColormap *colormap = GDK_COLORMAP (object); GdkColormap *colormap = GDK_COLORMAP (object);
GdkColormapPrivateWin32 *private = GDK_WIN32_COLORMAP_DATA (colormap); GdkColormapPrivateWin32 *private = GDK_WIN32_COLORMAP_DATA (colormap);
if (!DeleteObject (private->hpal)) GDI_CALL (DeleteObject, (private->hpal));
WIN32_GDI_FAILED ("DeleteObject");
if (private->hash) if (private->hash)
g_hash_table_destroy (private->hash); g_hash_table_destroy (private->hash);
@ -156,11 +155,12 @@ alloc_color_cells (GdkColormap *cmap,
if (npixels > nfree) if (npixels > nfree)
{ {
GDK_NOTE (COLORMAP, g_print ("...nope (%d > %d)\n", npixels, nfree)); GDK_NOTE (COLORMAP, g_print ("... nope (%d > %d)\n",
npixels, nfree));
return FALSE; return FALSE;
} }
else else
GDK_NOTE (COLORMAP, g_print ("...ok\n")); GDK_NOTE (COLORMAP, g_print ("... ok\n"));
iret = 0; iret = 0;
for (i = start; i < cmap->size && iret < npixels; i++) for (i = start; i < cmap->size && iret < npixels; i++)
@ -266,9 +266,8 @@ alloc_color (GdkColormap *cmap,
/* It was a nonused entry anyway, so we can use it, and /* It was a nonused entry anyway, so we can use it, and
* set it to the correct color. * set it to the correct color.
*/ */
GDK_NOTE (COLORMAP, g_print ("...was free\n")); GDK_NOTE (COLORMAP, g_print ("... was free\n"));
if (!SetPaletteEntries (cmapp->hpal, index, 1, &entry)) GDI_CALL (SetPaletteEntries, (cmapp->hpal, index, 1, &entry));
WIN32_GDI_FAILED ("SetPaletteEntries");
} }
else else
{ {
@ -281,7 +280,7 @@ alloc_color (GdkColormap *cmap,
{ {
/* An available slot, use it. */ /* An available slot, use it. */
GDK_NOTE (COLORMAP, GDK_NOTE (COLORMAP,
g_print ("...use free slot %d%s\n", g_print ("... use free slot %d%s\n",
i, (i >= cmapp->current_size) ? i, (i >= cmapp->current_size) ?
", will resize palette" : "")); ", will resize palette" : ""));
if (i >= cmapp->current_size) if (i >= cmapp->current_size)
@ -412,8 +411,7 @@ free_colors (GdkColormap *cmap,
{ {
if (cleared_entries[i]) if (cleared_entries[i])
{ {
if (!SetPaletteEntries (cmapp->hpal, i, 1, &pe)) GDI_CALL (SetPaletteEntries, (cmapp->hpal, i, 1, &pe));
WIN32_GDI_FAILED ("SetPaletteEntries");
GDK_NOTE (COLORMAP, set_black_count++); GDK_NOTE (COLORMAP, set_black_count++);
} }
} }
@ -675,8 +673,7 @@ gdk_colormap_change (GdkColormap *colormap,
pe[i].peFlags = 0; pe[i].peFlags = 0;
} }
if (!SetPaletteEntries (cmapp->hpal, 0, ncolors, pe)) GDI_CALL (SetPaletteEntries, (cmapp->hpal, 0, ncolors, pe));
WIN32_GDI_FAILED ("SetPaletteEntries");
g_free (pe); g_free (pe);
break; break;
@ -1258,8 +1255,7 @@ gdk_color_change (GdkColormap *colormap,
pe.peGreen = color->green >> 8; pe.peGreen = color->green >> 8;
pe.peBlue = color->blue >> 8; pe.peBlue = color->blue >> 8;
if (SetPaletteEntries (private->hpal, color->pixel, 1, &pe) == 0) GDI_CALL (SetPaletteEntries, (private->hpal, color->pixel, 1, &pe));
WIN32_GDI_FAILED ("SetPaletteEntries");
return TRUE; return TRUE;
} }

View File

@ -148,7 +148,7 @@ _gdk_monitor_init (void)
{ {
_gdk_monitors[i].x += _gdk_offset_x; _gdk_monitors[i].x += _gdk_offset_x;
_gdk_monitors[i].y += _gdk_offset_y; _gdk_monitors[i].y += _gdk_offset_y;
GDK_NOTE (MISC, g_print ("Monitor %d: %dx%d@+%d+%d\n", GDK_NOTE (MISC, g_print ("Monitor %d: %dx%d@%+d%+d\n",
i, _gdk_monitors[i].width, i, _gdk_monitors[i].width,
_gdk_monitors[i].height, _gdk_monitors[i].height,
_gdk_monitors[i].x, _gdk_monitors[i].y)); _gdk_monitors[i].x, _gdk_monitors[i].y));
@ -271,25 +271,26 @@ _win32_on_clipboard_change (HWND hwnd,
} }
case WM_DRAWCLIPBOARD : case WM_DRAWCLIPBOARD :
{ {
/* create the appropriate gdk events */ /* Create the appropriate gdk events */
HWND hwndOwner = GetClipboardOwner ();
UINT nFormat = 0;
int n = 0;
if (OpenClipboard (hwnd)) #ifdef G_ENABLE_DEBUG
{ if ((_gdk_debug_flags & GDK_DEBUG_DND) &&
for (; 0 != (nFormat = EnumClipboardFormats (nFormat)); ) OpenClipboard (hwnd))
{ {
char sFormat[80]; HWND hwndOwner = GetClipboardOwner ();
if (GetClipboardFormatName (nFormat, sFormat, 80) > 0) UINT nFormat = 0;
g_print ("%s ", sFormat);
n++; /* do something useful ? */ g_print ("WM_DRAWCLIPBOARD: owner:%p formats: ", hwndOwner);
} for (; 0 != (nFormat = EnumClipboardFormats (nFormat));)
GDK_NOTE (DND, {
g_print ("WM_DRAWCLIPBOARD : formats %d owner %#lx\n", n, hwndOwner)); char sFormat[80];
if (GetClipboardFormatName (nFormat, sFormat, G_N_ELEMENTS (sFormat)) > 0)
CloseClipboard (); g_print ("%s ", sFormat);
}
g_print ("\n");
CloseClipboard ();
} }
#endif
/* XXX: generate the apropriate GdkEventOwnerChange ... */ /* XXX: generate the apropriate GdkEventOwnerChange ... */
/* don't break the chain */ /* don't break the chain */

View File

@ -1021,7 +1021,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
if (uri != NULL) if (uri != NULL)
{ {
g_string_append (result, uri); g_string_append (result, uri);
GDK_NOTE (DND, g_print ("...%s link to %s: %s\n", GDK_NOTE (DND, g_print ("... %s link to %s: %s\n",
fileName, linkedFile, uri)); fileName, linkedFile, uri));
g_free (uri); g_free (uri);
} }
@ -1032,7 +1032,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
if (uri != NULL) if (uri != NULL)
{ {
g_string_append (result, uri); g_string_append (result, uri);
GDK_NOTE (DND, g_print ("...%s: %s\n", fileName, uri)); GDK_NOTE (DND, g_print ("... %s: %s\n", fileName, uri));
g_free (uri); g_free (uri);
} }
} }
@ -1419,7 +1419,7 @@ gdk_drag_find_window_for_screen (GdkDragContext *context,
} }
GDK_NOTE (DND, GDK_NOTE (DND,
g_print ("gdk_drag_find_window: %p +%d+%d: %p: %p %d\n", g_print ("gdk_drag_find_window: %p %+d%+d: %p: %p %d\n",
(drag_window ? GDK_WINDOW_HWND (drag_window) : NULL), (drag_window ? GDK_WINDOW_HWND (drag_window) : NULL),
x_root, y_root, x_root, y_root,
a.result, a.result,

View File

@ -397,7 +397,7 @@ draw_tiles_lowlevel (HDC dest,
{ {
gint x, y; gint x, y;
GDK_NOTE (MISC, g_print ("draw_tiles_lowlevel: %p +%d+%d tile=%p:%dx%d@+%d+%d %dx%d\n", GDK_NOTE (MISC, g_print ("draw_tiles_lowlevel: %p %+d%+d tile=%p:%dx%d@%+d%+d %dx%d\n",
dest, dest,
dest_x, dest_y, dest_x, dest_y,
tile, tile_width, tile_height, tile, tile_width, tile_height,
@ -855,7 +855,7 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
GdkRectangle bounds; GdkRectangle bounds;
GdkRegion *region; GdkRegion *region;
GDK_NOTE (MISC, g_print ("gdk_win32_draw_rectangle: %s (%p) %s%dx%d@+%d+%d\n", GDK_NOTE (MISC, g_print ("gdk_win32_draw_rectangle: %s (%p) %s%dx%d@%+d%+d\n",
_gdk_win32_drawable_description (drawable), _gdk_win32_drawable_description (drawable),
gc, gc,
(filled ? "fill " : ""), (filled ? "fill " : ""),
@ -922,20 +922,18 @@ draw_arc (GdkGCWin32 *gcwin32,
if (filled) if (filled)
{ {
old_pen = SelectObject (hdc, GetStockObject (NULL_PEN)); old_pen = SelectObject (hdc, GetStockObject (NULL_PEN));
GDK_NOTE (MISC, g_print ("...Pie(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n", GDK_NOTE (MISC, g_print ("... Pie(%p,%d,%d,%d,%d,%d,%d,%d,%d)\n",
x, y, x+width, y+height, hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXStartArc, nYStartArc, nXEndArc, nYEndArc));
nXEndArc, nYEndArc));
GDI_CALL (Pie, (hdc, x, y, x+width, y+height, GDI_CALL (Pie, (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc)); nXStartArc, nYStartArc, nXEndArc, nYEndArc));
GDI_CALL (SelectObject, (hdc, old_pen)); GDI_CALL (SelectObject, (hdc, old_pen));
} }
else else
{ {
GDK_NOTE (MISC, g_print ("...Arc(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n", GDK_NOTE (MISC, g_print ("... Arc(%p,%d,%d,%d,%d,%d,%d,%d,%d)\n",
x, y, x+width, y+height, hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXStartArc, nYStartArc, nXEndArc, nYEndArc));
nXEndArc, nYEndArc));
GDI_CALL (Arc, (hdc, x, y, x+width, y+height, GDI_CALL (Arc, (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc)); nXStartArc, nYStartArc, nXEndArc, nYEndArc));
} }
@ -1823,8 +1821,8 @@ _gdk_win32_blit (gboolean use_fg_bg,
GdkDrawableImplWin32 *src_impl = NULL; GdkDrawableImplWin32 *src_impl = NULL;
gint src_width, src_height; gint src_width, src_height;
GDK_NOTE (MISC, g_print ("_gdk_win32_blit: src:%s %dx%d@+%d+%d\n" GDK_NOTE (MISC, g_print ("_gdk_win32_blit: src:%s %dx%d@%+d%+d\n"
" dst:%s @+%d+%d use_fg_bg=%d\n", " dst:%s @%+d%+d use_fg_bg=%d\n",
_gdk_win32_drawable_description (src), _gdk_win32_drawable_description (src),
width, height, xsrc, ysrc, width, height, xsrc, ysrc,
_gdk_win32_drawable_description ((GdkDrawable *) drawable), _gdk_win32_drawable_description ((GdkDrawable *) drawable),
@ -1873,8 +1871,8 @@ _gdk_win32_blit (gboolean use_fg_bg,
{ {
OffsetRgn (outside_rgn, xdest, ydest); OffsetRgn (outside_rgn, xdest, ydest);
GDK_NOTE (MISC, (GetRgnBox (outside_rgn, &r), GDK_NOTE (MISC, (GetRgnBox (outside_rgn, &r),
g_print ("...calling InvalidateRgn, " g_print ("... InvalidateRgn "
"bbox: %ldx%ld@+%ld+%ld\n", "bbox: %ldx%ld@%+ld%+ld\n",
r.right - r.left - 1, r.bottom - r.top - 1, r.right - r.left - 1, r.bottom - r.top - 1,
r.left, r.top))); r.left, r.top)));
InvalidateRgn (draw_impl->handle, outside_rgn, TRUE); InvalidateRgn (draw_impl->handle, outside_rgn, TRUE);
@ -1897,8 +1895,8 @@ _gdk_win32_blit (gboolean use_fg_bg,
width = r.right - xsrc - 1; width = r.right - xsrc - 1;
height = r.bottom - ysrc - 1; height = r.bottom - ysrc - 1;
GDK_NOTE (MISC, g_print ("... restricted to src: %dx%d@+%d+%d, " GDK_NOTE (MISC, g_print ("... restricted to src: %dx%d@%+d%+d, "
"dest: @+%d+%d\n", "dest: @%+d%+d\n",
width, height, xsrc, ysrc, width, height, xsrc, ysrc,
xdest, ydest)); xdest, ydest));
} }

View File

@ -1553,8 +1553,7 @@ synthesize_expose_events (GdkWindow *window)
append_event (gdk_drawable_get_display (window), event); append_event (gdk_drawable_get_display (window), event);
} }
if (!ReleaseDC (impl->handle, hdc)) GDI_CALL (ReleaseDC, (impl->handle, hdc));
WIN32_GDI_FAILED ("ReleaseDC");
} }
} }
@ -1601,13 +1600,11 @@ update_colors (GdkWindow *window,
impl->handle, cmapp->hpal, k) : impl->handle, cmapp->hpal, k) :
(void) 0, (void) 0,
g_print (" %p", impl->handle))); g_print (" %p", impl->handle)));
if (!UpdateColors (hdc)) GDI_CALL (UpdateColors, (hdc));
WIN32_GDI_FAILED ("UpdateColors");
SelectPalette (hdc, holdpal, TRUE); SelectPalette (hdc, holdpal, TRUE);
RealizePalette (hdc); RealizePalette (hdc);
} }
if (!ReleaseDC (impl->handle, hdc)) GDI_CALL (ReleaseDC, (impl->handle, hdc));
WIN32_GDI_FAILED ("ReleaseDC");
} }
GDK_NOTE (COLORMAP, (top ? g_print ("\n") : (void) 0)); GDK_NOTE (COLORMAP, (top ? g_print ("\n") : (void) 0));
} }
@ -2148,7 +2145,6 @@ gdk_event_translate (GdkDisplay *display,
MINMAXINFO *mmi; MINMAXINFO *mmi;
HWND hwnd; HWND hwnd;
HCURSOR hcursor; HCURSOR hcursor;
CHARSETINFO charset_info;
BYTE key_state[256]; BYTE key_state[256];
HIMC himc; HIMC himc;
@ -3246,7 +3242,7 @@ gdk_event_translate (GdkDisplay *display,
impl = GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl); impl = GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl);
mmi = (MINMAXINFO*) msg->lParam; mmi = (MINMAXINFO*) msg->lParam;
GDK_NOTE (EVENTS, g_print (" (mintrack:%ldx%ld maxtrack:%ldx%ld " GDK_NOTE (EVENTS, g_print (" (mintrack:%ldx%ld maxtrack:%ldx%ld "
"maxpos:+%ld+%ld maxsize:%ldx%ld)", "maxpos:%+ld%+ld maxsize:%ldx%ld)",
mmi->ptMinTrackSize.x, mmi->ptMinTrackSize.y, mmi->ptMinTrackSize.x, mmi->ptMinTrackSize.y,
mmi->ptMaxTrackSize.x, mmi->ptMaxTrackSize.y, mmi->ptMaxTrackSize.x, mmi->ptMaxTrackSize.y,
mmi->ptMaxPosition.x, mmi->ptMaxPosition.y, mmi->ptMaxPosition.x, mmi->ptMaxPosition.y,
@ -3285,7 +3281,7 @@ gdk_event_translate (GdkDisplay *display,
{ {
/* Don't call DefWindowProc() */ /* Don't call DefWindowProc() */
GDK_NOTE (EVENTS, g_print (" (handled, mintrack:%ldx%ld maxtrack:%ldx%ld " GDK_NOTE (EVENTS, g_print (" (handled, mintrack:%ldx%ld maxtrack:%ldx%ld "
"maxpos:+%ld+%ld maxsize:%ldx%ld)", "maxpos:%+ld%+ld maxsize:%ldx%ld)",
mmi->ptMinTrackSize.x, mmi->ptMinTrackSize.y, mmi->ptMinTrackSize.x, mmi->ptMinTrackSize.y,
mmi->ptMaxTrackSize.x, mmi->ptMaxTrackSize.y, mmi->ptMaxTrackSize.x, mmi->ptMaxTrackSize.y,
mmi->ptMaxPosition.x, mmi->ptMaxPosition.y, mmi->ptMaxPosition.x, mmi->ptMaxPosition.y,

View File

@ -201,7 +201,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
obj = GDK_WINDOW_OBJECT (window); obj = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl); impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
GDK_NOTE (MISC, g_print ("_gdk_window_move_resize_child: %s@+%d+%d %dx%d@+%d+%d\n", GDK_NOTE (MISC, g_print ("_gdk_window_move_resize_child: %s@%+d%+d %dx%d@%+d%+d\n",
_gdk_win32_drawable_description (window), _gdk_win32_drawable_description (window),
obj->x, obj->y, obj->x, obj->y,
width, height, x, y)); width, height, x, y));
@ -214,11 +214,13 @@ _gdk_window_move_resize_child (GdkWindow *window,
if (!is_move && !is_resize) if (!is_move && !is_resize)
{ {
GDK_NOTE (MISC, g_print ("...neither move or resize\n")); GDK_NOTE (MISC, g_print ("... neither move or resize\n"));
return; return;
} }
GDK_NOTE (MISC, g_print ("...%s%s\n", is_move ? "is_move " : "", is_resize ? "is_resize" : "")); GDK_NOTE (MISC, g_print ("... %s%s\n",
is_move ? "is_move " : "",
is_resize ? "is_resize" : ""));
obj->x = x; obj->x = x;
obj->y = y; obj->y = y;
@ -242,7 +244,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
if (d_xoffset != 0 || d_yoffset != 0) if (d_xoffset != 0 || d_yoffset != 0)
{ {
GDK_NOTE (MISC, g_print ("...d_xoffset=%d d_yoffset=%d\n", d_xoffset, d_yoffset)); GDK_NOTE (MISC, g_print ("... d_offset=%+d%+d\n", d_xoffset, d_yoffset));
if (!ScrollWindowEx (GDK_WINDOW_HWND (window), if (!ScrollWindowEx (GDK_WINDOW_HWND (window),
-d_xoffset, -d_yoffset, /* in: scroll offsets */ -d_xoffset, -d_yoffset, /* in: scroll offsets */
@ -255,17 +257,20 @@ _gdk_window_move_resize_child (GdkWindow *window,
if (dx != d_xoffset || dy != d_yoffset || is_resize) if (dx != d_xoffset || dy != d_yoffset || is_resize)
{ {
GDK_NOTE (MISC, g_print ("...SetWindowPos(%p,%dx%d@+%d+%d)\n", GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,%d,%d,"
"NOACTIVATE|NOZORDER%s%s)\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
new_info.x, new_info.y,
new_info.width, new_info.height, new_info.width, new_info.height,
new_info.x, new_info.y)); (is_move ? "" : "|NOMOVE"),
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL, (is_resize ? "" : "|NOSIZE")));
new_info.x, new_info.y,
new_info.width, new_info.height, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
SWP_NOACTIVATE | SWP_NOZORDER | new_info.x, new_info.y,
(is_move ? 0 : SWP_NOMOVE) | new_info.width, new_info.height,
(is_resize ? 0 : SWP_NOSIZE))) SWP_NOACTIVATE | SWP_NOZORDER |
WIN32_API_FAILED ("SetWindowPos"); (is_move ? 0 : SWP_NOMOVE) |
(is_resize ? 0 : SWP_NOSIZE)));
} }
if (impl->position_info.no_bg) if (impl->position_info.no_bg)
@ -273,7 +278,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj)) if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj))
{ {
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_SHOWNA)\n", GDK_NOTE (MISC, g_print ("... ShowWindow(%p, SW_SHOWNA)\n",
GDK_WINDOW_HWND (window))); GDK_WINDOW_HWND (window)));
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA); ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
} }
@ -291,22 +296,25 @@ _gdk_window_move_resize_child (GdkWindow *window,
{ {
if (impl->position_info.mapped && !new_info.mapped) if (impl->position_info.mapped && !new_info.mapped)
{ {
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_HIDE)\n", GDK_NOTE (MISC, g_print ("... ShowWindow(%p, SW_HIDE)\n",
GDK_WINDOW_HWND (window))); GDK_WINDOW_HWND (window)));
ShowWindow (GDK_WINDOW_HWND (window), SW_HIDE); ShowWindow (GDK_WINDOW_HWND (window), SW_HIDE);
} }
GDK_NOTE (MISC, g_print ("...SetWindowPos(%p,%dx%d@+%d+%d)\n", GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,%d,%d,"
"NOACTIVATE|NOZORDER%s%s)\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
new_info.x, new_info.y,
new_info.width, new_info.height, new_info.width, new_info.height,
new_info.x, new_info.y)); (is_move ? "" : "|NOMOVE"),
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL, (is_resize ? "" : "|NOSIZE")));
new_info.x, new_info.y,
new_info.width, new_info.height, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
SWP_NOACTIVATE | SWP_NOZORDER | new_info.x, new_info.y,
(is_move ? 0 : SWP_NOMOVE) | new_info.width, new_info.height,
(is_resize ? 0 : SWP_NOSIZE))) SWP_NOACTIVATE | SWP_NOZORDER |
WIN32_API_FAILED ("SetWindowPos"); (is_move ? 0 : SWP_NOMOVE) |
(is_resize ? 0 : SWP_NOSIZE)));
tmp_list = obj->children; tmp_list = obj->children;
while (tmp_list) while (tmp_list)
@ -320,7 +328,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj)) if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj))
{ {
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_SHOWNA)\n", GDK_NOTE (MISC, g_print ("... ShowWindow(%p, SW_SHOWNA)\n",
GDK_WINDOW_HWND (window))); GDK_WINDOW_HWND (window)));
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA); ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
} }
@ -524,18 +532,18 @@ gdk_window_postmove (GdkWindow *window,
if (anti_scroll || (anti_scroll = d_xoffset != 0 || d_yoffset != 0)) if (anti_scroll || (anti_scroll = d_xoffset != 0 || d_yoffset != 0))
{ {
GDK_NOTE (MISC, g_print ("gdk_window_postmove: %s@+%d+%d\n" GDK_NOTE (MISC, g_print ("gdk_window_postmove: %s@%+d%+d\n"
"...SetWindowPos(%dx%d@+%d+%d)\n", "... SetWindowPos(%p,NULL,%d,%d,0,0,"
"NOREDRAW|NOZORDER|NOACTIVATE|NOSIZE)\n",
_gdk_win32_drawable_description (window), _gdk_win32_drawable_description (window),
obj->x, obj->y, obj->x, obj->y,
new_info.width, new_info.height, GDK_WINDOW_HWND (window),
new_info.x, new_info.y)); new_info.x, new_info.y));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
new_info.x, new_info.y, new_info.x, new_info.y,
0, 0, 0, 0,
SWP_NOREDRAW | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE)) SWP_NOREDRAW | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE));
WIN32_API_FAILED ("SetWindowPos");
} }
if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj)) if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj))

View File

@ -490,7 +490,7 @@ _gdk_input_wintab_init_check (void)
gdkdev->info.num_axes)); gdkdev->info.num_axes));
for (i = 0; i < gdkdev->info.num_axes; i++) for (i = 0; i < gdkdev->info.num_axes; i++)
GDK_NOTE (INPUT, GDK_NOTE (INPUT,
g_print ("...axis %d: %d--%d@%d (%d--%d@%d)\n", g_print ("... axis %d: %d--%d@%d (%d--%d@%d)\n",
i, i,
gdkdev->axes[i].xmin_value, gdkdev->axes[i].xmin_value,
gdkdev->axes[i].xmax_value, gdkdev->axes[i].xmax_value,
@ -762,7 +762,7 @@ _gdk_input_other_event (GdkEvent *event,
display = gdk_drawable_get_display (window); display = gdk_drawable_get_display (window);
GDK_NOTE (EVENTS_OR_INPUT, GDK_NOTE (EVENTS_OR_INPUT,
g_print ("gdk_input_win32_other_event: window=%p (%d,%d)\n", g_print ("gdk_input_win32_other_event: window=%p %+d%+d\n",
GDK_WINDOW_HWND (window), x, y)); GDK_WINDOW_HWND (window), x, y));
#else #else
@ -791,12 +791,12 @@ _gdk_input_other_event (GdkEvent *event,
* moved or resized, see bug #151090. */ * moved or resized, see bug #151090. */
if (_sizemove_in_progress) if (_sizemove_in_progress)
{ {
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...ignored when moving/sizing\n")); GDK_NOTE (EVENTS_OR_INPUT, g_print ("... ignored when moving/sizing\n"));
return FALSE; return FALSE;
} }
if (window == _gdk_parent_root && x_grab_window == NULL) if (window == _gdk_parent_root && x_grab_window == NULL)
{ {
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...is root\n")); GDK_NOTE (EVENTS_OR_INPUT, g_print ("... is root\n"));
return FALSE; return FALSE;
} }
@ -863,10 +863,10 @@ _gdk_input_other_event (GdkEvent *event,
|| !(x_grab_mask && masktest)) || !(x_grab_mask && masktest))
{ {
GDK_NOTE (EVENTS_OR_INPUT, GDK_NOTE (EVENTS_OR_INPUT,
g_print ("...grabber doesn't want it\n")); g_print ("... grabber doesn't want it\n"));
return FALSE; return FALSE;
} }
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...to grabber\n")); GDK_NOTE (EVENTS_OR_INPUT, g_print ("... to grabber\n"));
g_object_ref(x_grab_window); g_object_ref(x_grab_window);
g_object_unref(window); g_object_unref(window);
@ -880,7 +880,7 @@ _gdk_input_other_event (GdkEvent *event,
if (!GDK_WINDOW_IMPL_WIN32 (obj->impl)->extension_events_selected if (!GDK_WINDOW_IMPL_WIN32 (obj->impl)->extension_events_selected
|| !(obj->extension_events & masktest)) || !(obj->extension_events & masktest))
{ {
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...not selected\n")); GDK_NOTE (EVENTS_OR_INPUT, g_print ("... not selected\n"));
if (obj->parent == GDK_WINDOW_OBJECT (_gdk_parent_root)) if (obj->parent == GDK_WINDOW_OBJECT (_gdk_parent_root))
return FALSE; return FALSE;
@ -890,7 +890,7 @@ _gdk_input_other_event (GdkEvent *event,
if (obj->event_mask & masktest) if (obj->event_mask & masktest)
{ {
GDK_NOTE (EVENTS_OR_INPUT, GDK_NOTE (EVENTS_OR_INPUT,
g_print ("...wants ordinary event, ignoring this\n")); g_print ("... wants ordinary event, ignoring this\n"));
return FALSE; return FALSE;
} }
@ -904,7 +904,7 @@ _gdk_input_other_event (GdkEvent *event,
ScreenToClient (GDK_WINDOW_HWND (window), &pt); ScreenToClient (GDK_WINDOW_HWND (window), &pt);
x = pt.x; x = pt.x;
y = pt.y; y = pt.y;
GDK_NOTE (EVENTS_OR_INPUT, g_print ("...propagating to %p (%d,%d)\n", GDK_NOTE (EVENTS_OR_INPUT, g_print ("... propagating to %p %+d%+d\n",
GDK_WINDOW_HWND (window), x, y)); GDK_WINDOW_HWND (window), x, y));
goto dijkstra; goto dijkstra;
} }

View File

@ -892,7 +892,7 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
} }
#if 0 #if 0
GDK_NOTE (EVENTS, g_print ("...group=%d level=%d cmods=%#x keyval=%s\n", GDK_NOTE (EVENTS, g_print ("... group=%d level=%d cmods=%#x keyval=%s\n",
group, shift_level, tmp_modifiers, gdk_keyval_name (tmp_keyval))); group, shift_level, tmp_modifiers, gdk_keyval_name (tmp_keyval)));
#endif #endif

View File

@ -927,7 +927,7 @@ _gdk_win32_key_to_string (LONG lParam)
gchar * gchar *
_gdk_win32_rect_to_string (const RECT *rect) _gdk_win32_rect_to_string (const RECT *rect)
{ {
return static_printf ("%ldx%ld@+%ld+%ld", return static_printf ("%ldx%ld@%+ld%+ld",
(rect->right - rect->left), (rect->bottom - rect->top), (rect->right - rect->left), (rect->bottom - rect->top),
rect->left, rect->top); rect->left, rect->top);
} }
@ -935,7 +935,7 @@ _gdk_win32_rect_to_string (const RECT *rect)
gchar * gchar *
_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect) _gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect)
{ {
return static_printf ("%dx%d@+%d+%d", return static_printf ("%dx%d@%+d%+d",
rect->width, rect->height, rect->width, rect->height,
rect->x, rect->y); rect->x, rect->y);
} }
@ -943,7 +943,7 @@ _gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect)
gchar * gchar *
_gdk_win32_gdkregion_to_string (const GdkRegion *rgn) _gdk_win32_gdkregion_to_string (const GdkRegion *rgn)
{ {
return static_printf ("%dx%d@+%d+%d", return static_printf ("%dx%d@%+d%+d",
(rgn->extents.x2 - rgn->extents.x1), (rgn->extents.x2 - rgn->extents.x1),
(rgn->extents.y2 - rgn->extents.y1), (rgn->extents.y2 - rgn->extents.y1),
rgn->extents.x1, rgn->extents.y1); rgn->extents.x1, rgn->extents.y1);

View File

@ -108,8 +108,7 @@ gdk_pixmap_impl_win32_finalize (GObject *object)
GDK_NOTE (PIXMAP, g_print ("gdk_pixmap_impl_win32_finalize: %p\n", GDK_NOTE (PIXMAP, g_print ("gdk_pixmap_impl_win32_finalize: %p\n",
GDK_PIXMAP_HBITMAP (wrapper))); GDK_PIXMAP_HBITMAP (wrapper)));
if (!DeleteObject (GDK_PIXMAP_HBITMAP (wrapper))) GDI_CALL (DeleteObject, (GDK_PIXMAP_HBITMAP (wrapper)));
WIN32_GDI_FAILED ("DeleteObject");
gdk_win32_handle_table_remove (GDK_PIXMAP_HBITMAP (wrapper)); gdk_win32_handle_table_remove (GDK_PIXMAP_HBITMAP (wrapper));
@ -291,10 +290,9 @@ gdk_pixmap_new (GdkDrawable *drawable,
if (holdpal != NULL) if (holdpal != NULL)
SelectPalette (hdc, holdpal, FALSE); SelectPalette (hdc, holdpal, FALSE);
if (!ReleaseDC (hwnd, hdc)) GDI_CALL (ReleaseDC, (hwnd, hdc));
WIN32_GDI_FAILED ("ReleaseDC");
GDK_NOTE (PIXMAP, g_print ("...=%p bits=%p pixmap=%p\n", hbitmap, bits, pixmap)); GDK_NOTE (PIXMAP, g_print ("... =%p bits=%p pixmap=%p\n", hbitmap, bits, pixmap));
if (hbitmap == NULL) if (hbitmap == NULL)
{ {
@ -311,7 +309,7 @@ gdk_pixmap_new (GdkDrawable *drawable,
return pixmap; return pixmap;
} }
static unsigned char mirror[256] = { static const unsigned char mirror[256] = {
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,

View File

@ -319,7 +319,7 @@ gdk_property_change (GdkWindow *window,
if (data[i] == '\n') if (data[i] == '\n')
size++; size++;
size++; size++;
GDK_NOTE (DND, g_print ("...as text: %.40s\n", data)); GDK_NOTE (DND, g_print ("... as text: %.40s\n", data));
} }
else if (G_WIN32_IS_NT_BASED ()) else if (G_WIN32_IS_NT_BASED ())
{ {
@ -332,7 +332,7 @@ gdk_property_change (GdkWindow *window,
wclen++; /* Terminating 0 */ wclen++; /* Terminating 0 */
size = wclen * 2; size = wclen * 2;
GDK_NOTE (DND, g_print ("...as Unicode\n")); GDK_NOTE (DND, g_print ("... as Unicode\n"));
} }
else if (find_common_locale (data, nelements, nchars, &lcid, &buf, &size)) else if (find_common_locale (data, nelements, nchars, &lcid, &buf, &size))
{ {
@ -340,7 +340,7 @@ gdk_property_change (GdkWindow *window,
* some installed locale, use CF_TEXT and CF_LOCALE. * some installed locale, use CF_TEXT and CF_LOCALE.
*/ */
method = SINGLE_LOCALE; method = SINGLE_LOCALE;
GDK_NOTE (DND, g_print ("...as text in locale %#lx %d bytes\n", GDK_NOTE (DND, g_print ("... as text in locale %#lx %d bytes\n",
(gulong) lcid, size)); (gulong) lcid, size));
} }
else else
@ -384,7 +384,7 @@ gdk_property_change (GdkWindow *window,
} }
rtf = g_string_append (rtf, "}"); rtf = g_string_append (rtf, "}");
size = rtf->len + 1; size = rtf->len + 1;
GDK_NOTE (DND, g_print ("...as RTF: %.40s\n", rtf->str)); GDK_NOTE (DND, g_print ("... as RTF: %.40s\n", rtf->str));
} }
if (!(hdata = GlobalAlloc (GMEM_MOVEABLE, size))) if (!(hdata = GlobalAlloc (GMEM_MOVEABLE, size)))

View File

@ -253,7 +253,7 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
* gdk_property_change will be called to store the clipboard * gdk_property_change will be called to store the clipboard
* data. * data.
*/ */
GDK_NOTE (DND, g_print ("...sending GDK_SELECTION_REQUEST to ourselves\n")); GDK_NOTE (DND, g_print ("... sending GDK_SELECTION_REQUEST to ourselves\n"));
tmp_event.selection.type = GDK_SELECTION_REQUEST; tmp_event.selection.type = GDK_SELECTION_REQUEST;
tmp_event.selection.window = owner; tmp_event.selection.window = owner;
tmp_event.selection.send_event = FALSE; tmp_event.selection.send_event = FALSE;
@ -423,7 +423,7 @@ gdk_selection_convert (GdkWindow *requestor,
{ {
length = GlobalSize (hdata); length = GlobalSize (hdata);
GDK_NOTE (DND, g_print ("...CF_UNICODETEXT: %ld bytes\n", GDK_NOTE (DND, g_print ("... CF_UNICODETEXT: %ld bytes\n",
length)); length));
/* Strip out \r */ /* Strip out \r */
@ -464,7 +464,7 @@ gdk_selection_convert (GdkWindow *requestor,
{ {
length = GlobalSize (hdata); length = GlobalSize (hdata);
GDK_NOTE (DND, g_print ("...UTF8_STRING: %d bytes: %.10s\n", GDK_NOTE (DND, g_print ("... UTF8_STRING: %d bytes: %.10s\n",
length, ptr)); length, ptr));
_gdk_selection_property_store (requestor, target, 8, _gdk_selection_property_store (requestor, target, 8,
@ -488,7 +488,7 @@ gdk_selection_convert (GdkWindow *requestor,
{ {
length = GlobalSize (hdata); length = GlobalSize (hdata);
GDK_NOTE (DND, g_print ("...CF_TEXT: %ld bytes: %.10s\n", GDK_NOTE (DND, g_print ("... CF_TEXT: %ld bytes: %.10s\n",
length, ptr)); length, ptr));
if ((hlcid = GetClipboardData (CF_LOCALE)) != NULL) if ((hlcid = GetClipboardData (CF_LOCALE)) != NULL)
@ -499,7 +499,7 @@ gdk_selection_convert (GdkWindow *requestor,
buf, sizeof (buf))) buf, sizeof (buf)))
{ {
cp = atoi (buf); cp = atoi (buf);
GDK_NOTE (DND, g_print ("...CF_LOCALE: %#lx cp:%d\n", GDK_NOTE (DND, g_print ("... CF_LOCALE: %#lx cp:%d\n",
*lcidptr, cp)); *lcidptr, cp));
} }
GlobalUnlock (hlcid); GlobalUnlock (hlcid);
@ -556,7 +556,7 @@ gdk_selection_convert (GdkWindow *requestor,
BITMAPFILEHEADER *hdr; /* need to add a file header so gdk-pixbuf can load it */ BITMAPFILEHEADER *hdr; /* need to add a file header so gdk-pixbuf can load it */
gint length = GlobalSize (hdata) + sizeof(BITMAPFILEHEADER); gint length = GlobalSize (hdata) + sizeof(BITMAPFILEHEADER);
GDK_NOTE (DND, g_print ("...BITMAP: %d bytes\n", length)); GDK_NOTE (DND, g_print ("... BITMAP: %d bytes\n", length));
data = g_try_malloc (length); data = g_try_malloc (length);
if (data) if (data)

View File

@ -483,6 +483,7 @@ gdk_window_new_internal (GdkWindow *parent,
gint attributes_mask, gint attributes_mask,
gboolean from_set_skip_taskbar_hint) gboolean from_set_skip_taskbar_hint)
{ {
HWND hwndNew;
HANDLE hparent; HANDLE hparent;
ATOM klass = 0; ATOM klass = 0;
DWORD dwStyle = 0, dwExStyle; DWORD dwStyle = 0, dwExStyle;
@ -602,7 +603,7 @@ gdk_window_new_internal (GdkWindow *parent,
private->input_only = TRUE; private->input_only = TRUE;
draw_impl->colormap = gdk_screen_get_system_colormap (screen); draw_impl->colormap = gdk_screen_get_system_colormap (screen);
g_object_ref (draw_impl->colormap); g_object_ref (draw_impl->colormap);
GDK_NOTE (MISC, g_print ("...GDK_INPUT_ONLY, system colormap")); GDK_NOTE (MISC, g_print ("... GDK_INPUT_ONLY, system colormap"));
} }
switch (private->window_type) switch (private->window_type)
@ -688,20 +689,18 @@ gdk_window_new_internal (GdkWindow *parent,
mbtitle = g_locale_from_utf8 (title, -1, NULL, NULL, NULL); mbtitle = g_locale_from_utf8 (title, -1, NULL, NULL, NULL);
{ hwndNew = CreateWindowEx (dwExStyle,
HWND hwndNew = MAKEINTRESOURCE(klass),
CreateWindowEx (dwExStyle, mbtitle,
MAKEINTRESOURCE(klass), dwStyle,
mbtitle, ((attributes_mask & GDK_WA_X) ?
dwStyle, impl->position_info.x - offset_x : CW_USEDEFAULT),
((attributes_mask & GDK_WA_X) ? impl->position_info.y - offset_y,
impl->position_info.x - offset_x: CW_USEDEFAULT), window_width, window_height,
impl->position_info.y - offset_y, hparent,
window_width, window_height, NULL,
hparent, _gdk_app_hmodule,
NULL, window);
_gdk_app_hmodule,
window);
if (GDK_WINDOW_HWND (window) != hwndNew) if (GDK_WINDOW_HWND (window) != hwndNew)
{ {
g_warning("gdk_window_new: gdk_event_translate::WM_CREATE (%p, %p) HWND mismatch.", g_warning("gdk_window_new: gdk_event_translate::WM_CREATE (%p, %p) HWND mismatch.",
@ -723,11 +722,11 @@ gdk_window_new_internal (GdkWindow *parent,
# endif # endif
} }
}
g_object_ref (window); g_object_ref (window);
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window); gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window);
GDK_NOTE (MISC, g_print ("... \"%s\" %dx%d@+%d+%d %p = %p\n", GDK_NOTE (MISC, g_print ("... \"%s\" %dx%d@%+d%+d %p = %p\n",
mbtitle, mbtitle,
window_width, window_height, window_width, window_height,
((attributes_mask & GDK_WA_X) ? ((attributes_mask & GDK_WA_X) ?
@ -822,6 +821,11 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
g_object_ref (window); g_object_ref (window);
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window); gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window);
GDK_NOTE (MISC, g_print ("gdk_window_foreign_new_for_display: %p: %s@%+d%+d\n",
(HWND) anid,
_gdk_win32_drawable_description (window),
private->x, private->y));
return window; return window;
} }
@ -1066,8 +1070,7 @@ show_window_internal (GdkWindow *window,
if (private->state & GDK_WINDOW_STATE_ABOVE) if (private->state & GDK_WINDOW_STATE_ABOVE)
exstyle |= WS_EX_TOPMOST; exstyle |= WS_EX_TOPMOST;
if (!SetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE, exstyle)) API_CALL (SetWindowLong, (GDK_WINDOW_HWND (window), GWL_EXSTYLE, exstyle));
WIN32_API_FAILED ("SetWindowLong");
} }
if (private->state & GDK_WINDOW_STATE_FULLSCREEN) if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
@ -1084,10 +1087,11 @@ show_window_internal (GdkWindow *window,
if (raise) if (raise)
{ {
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP) if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOPMOST, 0, 0, 0, 0, SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOPMOST,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); 0, 0, 0, 0,
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|| GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG) else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
SetForegroundWindow (GDK_WINDOW_HWND (window)); SetForegroundWindow (GDK_WINDOW_HWND (window));
else else
BringWindowToTop (GDK_WINDOW_HWND (window)); BringWindowToTop (GDK_WINDOW_HWND (window));
@ -1139,7 +1143,8 @@ gdk_window_hide (GdkWindow *window)
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT) if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
{ {
SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0, SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM,
0, 0, 0, 0,
SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE); SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
} }
else else
@ -1180,7 +1185,7 @@ gdk_window_move (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window)) if (GDK_WINDOW_DESTROYED (window))
return; return;
GDK_NOTE (MISC, g_print ("gdk_window_move: %p: +%d+%d\n", GDK_NOTE (MISC, g_print ("gdk_window_move: %p: %+d%+d\n",
GDK_WINDOW_HWND (window), x, y)); GDK_WINDOW_HWND (window), x, y));
impl = GDK_WINDOW_IMPL_WIN32 (private->impl); impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
@ -1188,7 +1193,11 @@ gdk_window_move (GdkWindow *window,
if (private->state & GDK_WINDOW_STATE_FULLSCREEN) if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
return; return;
if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD) /* Don't check GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD.
* Foreign windows (another app's windows) might be children of our
* windows! Especially in the case of gtkplug/socket.
*/
if (GetAncestor (GDK_WINDOW_HWND (window), GA_PARENT) != _gdk_root_window)
_gdk_window_move_resize_child (window, x, y, impl->width, impl->height); _gdk_window_move_resize_child (window, x, y, impl->width, impl->height);
else else
{ {
@ -1198,6 +1207,11 @@ gdk_window_move (GdkWindow *window,
adjust_for_gravity_hints (impl, &outer_rect, &x, &y); adjust_for_gravity_hints (impl, &outer_rect, &x, &y);
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,0,0,"
"NOACTIVATE|NOSIZE|NOZORDER)\n",
GDK_WINDOW_HWND (window),
x - _gdk_offset_x, y - _gdk_offset_y));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
x - _gdk_offset_x, y - _gdk_offset_y, 0, 0, x - _gdk_offset_x, y - _gdk_offset_y, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER)); SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
@ -1231,13 +1245,19 @@ gdk_window_resize (GdkWindow *window,
if (private->state & GDK_WINDOW_STATE_FULLSCREEN) if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
return; return;
if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD) if (GetAncestor (GDK_WINDOW_HWND (window), GA_PARENT) != _gdk_root_window)
_gdk_window_move_resize_child (window, private->x, private->y, width, height); _gdk_window_move_resize_child (window, private->x, private->y, width, height);
else else
{ {
RECT outer_rect; RECT outer_rect;
get_outer_rect (window, width, height, &outer_rect); get_outer_rect (window, width, height, &outer_rect);
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,0,0,%ld,%ld,"
"NOACTIVATE|NOMOVE|NOZORDER)\n",
GDK_WINDOW_HWND (window),
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
0, 0, 0, 0,
outer_rect.right - outer_rect.left, outer_rect.right - outer_rect.left,
@ -1273,11 +1293,11 @@ gdk_window_move_resize (GdkWindow *window,
if (private->state & GDK_WINDOW_STATE_FULLSCREEN) if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
return; return;
GDK_NOTE (MISC, g_print ("gdk_window_move_resize: %p: %dx%d@+%d+%d\n", GDK_NOTE (MISC, g_print ("gdk_window_move_resize: %p: %dx%d@%+d%+d\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
width, height, x, y)); width, height, x, y));
if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD) if (GetAncestor (GDK_WINDOW_HWND (window), GA_PARENT) != _gdk_root_window)
_gdk_window_move_resize_child (window, x, y, width, height); _gdk_window_move_resize_child (window, x, y, width, height);
else else
{ {
@ -1287,6 +1307,13 @@ gdk_window_move_resize (GdkWindow *window,
adjust_for_gravity_hints (impl, &outer_rect, &x, &y); adjust_for_gravity_hints (impl, &outer_rect, &x, &y);
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,%ld,%ld,"
"NOACTIVATE|NOZORDER)\n",
GDK_WINDOW_HWND (window),
x - _gdk_offset_x, y - _gdk_offset_y,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
x - _gdk_offset_x, y - _gdk_offset_y, x - _gdk_offset_x, y - _gdk_offset_y,
outer_rect.right - outer_rect.left, outer_rect.right - outer_rect.left,
@ -1377,7 +1404,7 @@ _gdk_windowing_window_clear_area (GdkWindow *window,
if (height == 0) if (height == 0)
height = impl->height - y; height = impl->height - y;
GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area: %p: " GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area: %p: "
"%dx%d@+%d+%d\n", "%dx%d@%+d%+d\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
width, height, x, y)); width, height, x, y));
hdc = GetDC (GDK_WINDOW_HWND (window)); hdc = GetDC (GDK_WINDOW_HWND (window));
@ -1402,7 +1429,7 @@ _gdk_windowing_window_clear_area_e (GdkWindow *window,
RECT rect; RECT rect;
GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area_e: %p: " GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area_e: %p: "
"%dx%d@+%d+%d\n", "%dx%d@%+d%+d\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
width, height, x, y)); width, height, x, y));
@ -1438,10 +1465,14 @@ gdk_window_lower (GdkWindow *window)
if (!GDK_WINDOW_DESTROYED (window)) if (!GDK_WINDOW_DESTROYED (window))
{ {
GDK_NOTE (MISC, g_print ("gdk_window_lower: %p\n", GDK_NOTE (MISC, g_print ("gdk_window_lower: %p\n"
"... SetWindowPos(%p,HWND_BOTTOM,0,0,0,0,"
"NOACTIVATE|NOMOVE|NOSIZE)\n",
GDK_WINDOW_HWND (window),
GDK_WINDOW_HWND (window))); GDK_WINDOW_HWND (window)));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_BOTTOM,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE)); SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
} }
} }
@ -1468,7 +1499,7 @@ gdk_window_set_hints (GdkWindow *window,
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl); impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
GDK_NOTE (MISC, g_print ("gdk_window_set_hints: %p: %dx%d..%dx%d @+%d+%d\n", GDK_NOTE (MISC, g_print ("gdk_window_set_hints: %p: %dx%d..%dx%d @%+d%+d\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
min_width, min_height, max_width, max_height, min_width, min_height, max_width, max_height,
x, y)); x, y));
@ -1604,7 +1635,7 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.rcNormalPosition.left + geometry->base_width; size_hints.rcNormalPosition.left + geometry->base_width;
size_hints.rcNormalPosition.bottom = size_hints.rcNormalPosition.bottom =
size_hints.rcNormalPosition.top + geometry->base_height; size_hints.rcNormalPosition.top + geometry->base_height;
GDK_NOTE (MISC, g_print ("...setting: rcNormal: (%ld,%ld)--(%ld,%ld)\n", GDK_NOTE (MISC, g_print ("... setting: rcNormal: (%ld,%ld)--(%ld,%ld)\n",
size_hints.rcNormalPosition.left, size_hints.rcNormalPosition.left,
size_hints.rcNormalPosition.top, size_hints.rcNormalPosition.top,
size_hints.rcNormalPosition.right, size_hints.rcNormalPosition.right,
@ -1691,7 +1722,7 @@ gdk_window_set_transient_for (GdkWindow *window,
if (((GdkWindowObject *) window)->window_type == GDK_WINDOW_CHILD) if (((GdkWindowObject *) window)->window_type == GDK_WINDOW_CHILD)
{ {
GDK_NOTE (MISC, g_print ("...a child window!\n")); GDK_NOTE (MISC, g_print ("... a child window!\n"));
return; return;
} }
@ -1815,7 +1846,7 @@ gdk_window_set_cursor (GdkWindow *window,
*/ */
if ((impl->hcursor = CopyCursor (hcursor)) == NULL) if ((impl->hcursor = CopyCursor (hcursor)) == NULL)
WIN32_API_FAILED ("CopyCursor"); WIN32_API_FAILED ("CopyCursor");
GDK_NOTE (MISC, g_print ("...CopyCursor (%p) = %p\n", GDK_NOTE (MISC, g_print ("... CopyCursor (%p) = %p\n",
hcursor, impl->hcursor)); hcursor, impl->hcursor));
} }
@ -1872,8 +1903,7 @@ gdk_window_set_cursor (GdkWindow *window,
SetCursor (hcursor); SetCursor (hcursor);
} }
GDK_NOTE (MISC, g_print ("...DestroyCursor (%p)\n", GDK_NOTE (MISC, g_print ("... DestroyCursor (%p)\n", hprevcursor));
hprevcursor));
API_CALL (DestroyCursor, (hprevcursor)); API_CALL (DestroyCursor, (hprevcursor));
} }
@ -1937,7 +1967,7 @@ gdk_window_get_geometry (GdkWindow *window,
if (depth) if (depth)
*depth = gdk_drawable_get_visual (window)->depth; *depth = gdk_drawable_get_visual (window)->depth;
GDK_NOTE (MISC, g_print ("gdk_window_get_geometry: %p: %ldx%ldx%d@+%ld+%ld\n", GDK_NOTE (MISC, g_print ("gdk_window_get_geometry: %p: %ldx%ldx%d@%+ld%+ld\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
rect.right - rect.left, rect.bottom - rect.top, rect.right - rect.left, rect.bottom - rect.top,
gdk_drawable_get_visual (window)->depth, gdk_drawable_get_visual (window)->depth,
@ -1975,7 +2005,7 @@ gdk_window_get_origin (GdkWindow *window,
if (y) if (y)
*y = ty + _gdk_offset_y; *y = ty + _gdk_offset_y;
GDK_NOTE (MISC, g_print ("gdk_window_get_origin: %p: +%d+%d\n", GDK_NOTE (MISC, g_print ("gdk_window_get_origin: %p: %+d%+d\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
tx, ty)); tx, ty));
return return_val; return return_val;
@ -2006,7 +2036,7 @@ gdk_window_get_root_origin (GdkWindow *window,
if (y) if (y)
*y = rect.y; *y = rect.y;
GDK_NOTE (MISC, g_print ("gdk_window_get_root_origin: %p: +%d+%d\n", GDK_NOTE (MISC, g_print ("gdk_window_get_root_origin: %p: %+d%+d\n",
GDK_WINDOW_HWND (window), rect.x, rect.y)); GDK_WINDOW_HWND (window), rect.x, rect.y));
} }
@ -2045,7 +2075,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
rect->width = r.right - r.left; rect->width = r.right - r.left;
rect->height = r.bottom - r.top; rect->height = r.bottom - r.top;
GDK_NOTE (MISC, g_print ("gdk_window_get_frame_extents: %p: %ldx%ld@+%ld+%ld\n", GDK_NOTE (MISC, g_print ("gdk_window_get_frame_extents: %p: %ldx%ld@%+ld%+ld\n",
GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (window),
r.right - r.left, r.bottom - r.top, r.right - r.left, r.bottom - r.top,
r.left, r.top)); r.left, r.top));
@ -2184,7 +2214,7 @@ _gdk_windowing_window_at_pointer (GdkDisplay *display,
*win_y = point.y - rect.top; *win_y = point.y - rect.top;
} }
GDK_NOTE (MISC, g_print ("_gdk_windowing_window_at_pointer: +%d+%d %p%s\n", GDK_NOTE (MISC, g_print ("_gdk_windowing_window_at_pointer: %+d%+d %p%s\n",
*win_x, *win_y, *win_x, *win_y,
hwnd, hwnd,
(window == NULL ? " NULL" : ""))); (window == NULL ? " NULL" : "")));
@ -2671,7 +2701,8 @@ gdk_window_set_decorations (GdkWindow *window,
style &= ~settable_bits, style |= bits; style &= ~settable_bits, style |= bits;
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style); SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
SetWindowPos (GDK_WINDOW_HWND (window), NULL, 0, 0, 0, 0, SetWindowPos (GDK_WINDOW_HWND (window), NULL,
0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER); SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
} }
@ -2740,7 +2771,8 @@ gdk_window_set_functions (GdkWindow *window,
style &= ~settable_bits, style |= bits; style &= ~settable_bits, style |= bits;
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style); SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
SetWindowPos (GDK_WINDOW_HWND (window), NULL, 0, 0, 0, 0, SetWindowPos (GDK_WINDOW_HWND (window), NULL,
0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER); SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
} }
@ -3103,10 +3135,10 @@ gdk_window_fullscreen (GdkWindow *window)
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
(fi->style & ~WS_OVERLAPPEDWINDOW) | WS_POPUP); (fi->style & ~WS_OVERLAPPEDWINDOW) | WS_POPUP);
if (!SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP /*not MOST, taskswitch!*/,
0, 0, width, height, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
SWP_NOCOPYBITS | SWP_SHOWWINDOW)) 0, 0, width, height,
WIN32_API_FAILED ("SetWindowPos"); SWP_NOCOPYBITS | SWP_SHOWWINDOW));
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN); gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
} }
@ -3127,11 +3159,11 @@ gdk_window_unfullscreen (GdkWindow *window)
impl->hint_flags = fi->hint_flags; impl->hint_flags = fi->hint_flags;
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, fi->style); SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, fi->style);
if (!SetWindowPos (GDK_WINDOW_HWND (window), HWND_NOTOPMOST, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_NOTOPMOST,
fi->r.left, fi->r.top, fi->r.right - fi->r.left, fi->r.bottom - fi->r.top, fi->r.left, fi->r.top,
SWP_NOCOPYBITS | SWP_SHOWWINDOW)) fi->r.right - fi->r.left, fi->r.bottom - fi->r.top,
WIN32_API_FAILED ("SetWindowPos"); SWP_NOCOPYBITS | SWP_SHOWWINDOW));
g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL); g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
g_free (fi); g_free (fi);
@ -3149,9 +3181,10 @@ gdk_window_set_keep_above (GdkWindow *window, gboolean setting)
if (GDK_WINDOW_IS_MAPPED (window)) if (GDK_WINDOW_IS_MAPPED (window))
{ {
if (!SetWindowPos(GDK_WINDOW_HWND (window), setting ? HWND_TOPMOST : HWND_NOTOPMOST, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE)) setting ? HWND_TOPMOST : HWND_NOTOPMOST,
WIN32_API_FAILED ("SetWindowPos"); 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
} }
else else
gdk_synthesize_window_state (window, gdk_synthesize_window_state (window,
@ -3169,9 +3202,10 @@ gdk_window_set_keep_below (GdkWindow *window, gboolean setting)
if (GDK_WINDOW_IS_MAPPED (window)) if (GDK_WINDOW_IS_MAPPED (window))
{ {
if (!SetWindowPos(GDK_WINDOW_HWND (window), setting ? HWND_BOTTOM : HWND_NOTOPMOST, API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE)) setting ? HWND_BOTTOM : HWND_NOTOPMOST,
WIN32_API_FAILED ("SetWindowPos"); 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
} }
else else
gdk_synthesize_window_state (window, gdk_synthesize_window_state (window,
@ -3218,7 +3252,8 @@ gdk_window_set_modal_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window)) if (GDK_WINDOW_IS_MAPPED (window))
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
modal ? HWND_TOPMOST : HWND_NOTOPMOST, modal ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)); 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE));
} }
void void
@ -3251,7 +3286,8 @@ gdk_window_set_skip_taskbar_hint (GdkWindow *window,
#if 0 /* Should we also turn off the minimize and maximize buttons? */ #if 0 /* Should we also turn off the minimize and maximize buttons? */
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE) & ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU)); GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE) & ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU));
SetWindowPos (GDK_WINDOW_HWND (window), NULL, 0, 0, 0, 0, SetWindowPos (GDK_WINDOW_HWND (window), NULL,
0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER); SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
#endif #endif