forked from AuroraMiddleware/gtk
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:
parent
1b2584a8ac
commit
df9768cf3a
17
ChangeLog
17
ChangeLog
@ -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>
|
||||
|
||||
* gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtkradioaction.c (gtk_radio_action_get_group): Add an
|
||||
|
@ -107,8 +107,7 @@ gdk_colormap_finalize (GObject *object)
|
||||
GdkColormap *colormap = GDK_COLORMAP (object);
|
||||
GdkColormapPrivateWin32 *private = GDK_WIN32_COLORMAP_DATA (colormap);
|
||||
|
||||
if (!DeleteObject (private->hpal))
|
||||
WIN32_GDI_FAILED ("DeleteObject");
|
||||
GDI_CALL (DeleteObject, (private->hpal));
|
||||
|
||||
if (private->hash)
|
||||
g_hash_table_destroy (private->hash);
|
||||
@ -156,11 +155,12 @@ alloc_color_cells (GdkColormap *cmap,
|
||||
|
||||
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;
|
||||
}
|
||||
else
|
||||
GDK_NOTE (COLORMAP, g_print ("...ok\n"));
|
||||
GDK_NOTE (COLORMAP, g_print ("... ok\n"));
|
||||
|
||||
iret = 0;
|
||||
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
|
||||
* set it to the correct color.
|
||||
*/
|
||||
GDK_NOTE (COLORMAP, g_print ("...was free\n"));
|
||||
if (!SetPaletteEntries (cmapp->hpal, index, 1, &entry))
|
||||
WIN32_GDI_FAILED ("SetPaletteEntries");
|
||||
GDK_NOTE (COLORMAP, g_print ("... was free\n"));
|
||||
GDI_CALL (SetPaletteEntries, (cmapp->hpal, index, 1, &entry));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -281,7 +280,7 @@ alloc_color (GdkColormap *cmap,
|
||||
{
|
||||
/* An available slot, use it. */
|
||||
GDK_NOTE (COLORMAP,
|
||||
g_print ("...use free slot %d%s\n",
|
||||
g_print ("... use free slot %d%s\n",
|
||||
i, (i >= cmapp->current_size) ?
|
||||
", will resize palette" : ""));
|
||||
if (i >= cmapp->current_size)
|
||||
@ -412,8 +411,7 @@ free_colors (GdkColormap *cmap,
|
||||
{
|
||||
if (cleared_entries[i])
|
||||
{
|
||||
if (!SetPaletteEntries (cmapp->hpal, i, 1, &pe))
|
||||
WIN32_GDI_FAILED ("SetPaletteEntries");
|
||||
GDI_CALL (SetPaletteEntries, (cmapp->hpal, i, 1, &pe));
|
||||
GDK_NOTE (COLORMAP, set_black_count++);
|
||||
}
|
||||
}
|
||||
@ -675,8 +673,7 @@ gdk_colormap_change (GdkColormap *colormap,
|
||||
pe[i].peFlags = 0;
|
||||
}
|
||||
|
||||
if (!SetPaletteEntries (cmapp->hpal, 0, ncolors, pe))
|
||||
WIN32_GDI_FAILED ("SetPaletteEntries");
|
||||
GDI_CALL (SetPaletteEntries, (cmapp->hpal, 0, ncolors, pe));
|
||||
g_free (pe);
|
||||
break;
|
||||
|
||||
@ -1258,8 +1255,7 @@ gdk_color_change (GdkColormap *colormap,
|
||||
pe.peGreen = color->green >> 8;
|
||||
pe.peBlue = color->blue >> 8;
|
||||
|
||||
if (SetPaletteEntries (private->hpal, color->pixel, 1, &pe) == 0)
|
||||
WIN32_GDI_FAILED ("SetPaletteEntries");
|
||||
GDI_CALL (SetPaletteEntries, (private->hpal, color->pixel, 1, &pe));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ _gdk_monitor_init (void)
|
||||
{
|
||||
_gdk_monitors[i].x += _gdk_offset_x;
|
||||
_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,
|
||||
_gdk_monitors[i].height,
|
||||
_gdk_monitors[i].x, _gdk_monitors[i].y));
|
||||
@ -271,25 +271,26 @@ _win32_on_clipboard_change (HWND hwnd,
|
||||
}
|
||||
case WM_DRAWCLIPBOARD :
|
||||
{
|
||||
/* create the appropriate gdk events */
|
||||
HWND hwndOwner = GetClipboardOwner ();
|
||||
UINT nFormat = 0;
|
||||
int n = 0;
|
||||
/* Create the appropriate gdk events */
|
||||
|
||||
if (OpenClipboard (hwnd))
|
||||
{
|
||||
for (; 0 != (nFormat = EnumClipboardFormats (nFormat)); )
|
||||
{
|
||||
char sFormat[80];
|
||||
if (GetClipboardFormatName (nFormat, sFormat, 80) > 0)
|
||||
g_print ("%s ", sFormat);
|
||||
n++; /* do something useful ? */
|
||||
}
|
||||
GDK_NOTE (DND,
|
||||
g_print ("WM_DRAWCLIPBOARD : formats %d owner %#lx\n", n, hwndOwner));
|
||||
|
||||
CloseClipboard ();
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if ((_gdk_debug_flags & GDK_DEBUG_DND) &&
|
||||
OpenClipboard (hwnd))
|
||||
{
|
||||
HWND hwndOwner = GetClipboardOwner ();
|
||||
UINT nFormat = 0;
|
||||
|
||||
g_print ("WM_DRAWCLIPBOARD: owner:%p formats: ", hwndOwner);
|
||||
for (; 0 != (nFormat = EnumClipboardFormats (nFormat));)
|
||||
{
|
||||
char sFormat[80];
|
||||
if (GetClipboardFormatName (nFormat, sFormat, G_N_ELEMENTS (sFormat)) > 0)
|
||||
g_print ("%s ", sFormat);
|
||||
}
|
||||
g_print ("\n");
|
||||
CloseClipboard ();
|
||||
}
|
||||
#endif
|
||||
/* XXX: generate the apropriate GdkEventOwnerChange ... */
|
||||
|
||||
/* don't break the chain */
|
||||
|
@ -1021,7 +1021,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
|
||||
if (uri != NULL)
|
||||
{
|
||||
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));
|
||||
g_free (uri);
|
||||
}
|
||||
@ -1032,7 +1032,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
|
||||
if (uri != NULL)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1419,7 +1419,7 @@ gdk_drag_find_window_for_screen (GdkDragContext *context,
|
||||
}
|
||||
|
||||
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),
|
||||
x_root, y_root,
|
||||
a.result,
|
||||
|
@ -397,7 +397,7 @@ draw_tiles_lowlevel (HDC dest,
|
||||
{
|
||||
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_x, dest_y,
|
||||
tile, tile_width, tile_height,
|
||||
@ -855,7 +855,7 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
|
||||
GdkRectangle bounds;
|
||||
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),
|
||||
gc,
|
||||
(filled ? "fill " : ""),
|
||||
@ -922,20 +922,18 @@ draw_arc (GdkGCWin32 *gcwin32,
|
||||
if (filled)
|
||||
{
|
||||
old_pen = SelectObject (hdc, GetStockObject (NULL_PEN));
|
||||
GDK_NOTE (MISC, g_print ("...Pie(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n",
|
||||
x, y, x+width, y+height,
|
||||
nXStartArc, nYStartArc,
|
||||
nXEndArc, nYEndArc));
|
||||
GDK_NOTE (MISC, g_print ("... Pie(%p,%d,%d,%d,%d,%d,%d,%d,%d)\n",
|
||||
hdc, x, y, x+width, y+height,
|
||||
nXStartArc, nYStartArc, nXEndArc, nYEndArc));
|
||||
GDI_CALL (Pie, (hdc, x, y, x+width, y+height,
|
||||
nXStartArc, nYStartArc, nXEndArc, nYEndArc));
|
||||
GDI_CALL (SelectObject, (hdc, old_pen));
|
||||
}
|
||||
else
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("...Arc(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n",
|
||||
x, y, x+width, y+height,
|
||||
nXStartArc, nYStartArc,
|
||||
nXEndArc, nYEndArc));
|
||||
GDK_NOTE (MISC, g_print ("... Arc(%p,%d,%d,%d,%d,%d,%d,%d,%d)\n",
|
||||
hdc, x, y, x+width, y+height,
|
||||
nXStartArc, nYStartArc, nXEndArc, nYEndArc));
|
||||
GDI_CALL (Arc, (hdc, x, y, x+width, y+height,
|
||||
nXStartArc, nYStartArc, nXEndArc, nYEndArc));
|
||||
}
|
||||
@ -1823,8 +1821,8 @@ _gdk_win32_blit (gboolean use_fg_bg,
|
||||
GdkDrawableImplWin32 *src_impl = NULL;
|
||||
gint src_width, src_height;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("_gdk_win32_blit: src:%s %dx%d@+%d+%d\n"
|
||||
" dst:%s @+%d+%d use_fg_bg=%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",
|
||||
_gdk_win32_drawable_description (src),
|
||||
width, height, xsrc, ysrc,
|
||||
_gdk_win32_drawable_description ((GdkDrawable *) drawable),
|
||||
@ -1873,8 +1871,8 @@ _gdk_win32_blit (gboolean use_fg_bg,
|
||||
{
|
||||
OffsetRgn (outside_rgn, xdest, ydest);
|
||||
GDK_NOTE (MISC, (GetRgnBox (outside_rgn, &r),
|
||||
g_print ("...calling InvalidateRgn, "
|
||||
"bbox: %ldx%ld@+%ld+%ld\n",
|
||||
g_print ("... InvalidateRgn "
|
||||
"bbox: %ldx%ld@%+ld%+ld\n",
|
||||
r.right - r.left - 1, r.bottom - r.top - 1,
|
||||
r.left, r.top)));
|
||||
InvalidateRgn (draw_impl->handle, outside_rgn, TRUE);
|
||||
@ -1897,8 +1895,8 @@ _gdk_win32_blit (gboolean use_fg_bg,
|
||||
width = r.right - xsrc - 1;
|
||||
height = r.bottom - ysrc - 1;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... restricted to src: %dx%d@+%d+%d, "
|
||||
"dest: @+%d+%d\n",
|
||||
GDK_NOTE (MISC, g_print ("... restricted to src: %dx%d@%+d%+d, "
|
||||
"dest: @%+d%+d\n",
|
||||
width, height, xsrc, ysrc,
|
||||
xdest, ydest));
|
||||
}
|
||||
|
@ -1553,8 +1553,7 @@ synthesize_expose_events (GdkWindow *window)
|
||||
|
||||
append_event (gdk_drawable_get_display (window), event);
|
||||
}
|
||||
if (!ReleaseDC (impl->handle, hdc))
|
||||
WIN32_GDI_FAILED ("ReleaseDC");
|
||||
GDI_CALL (ReleaseDC, (impl->handle, hdc));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1601,13 +1600,11 @@ update_colors (GdkWindow *window,
|
||||
impl->handle, cmapp->hpal, k) :
|
||||
(void) 0,
|
||||
g_print (" %p", impl->handle)));
|
||||
if (!UpdateColors (hdc))
|
||||
WIN32_GDI_FAILED ("UpdateColors");
|
||||
GDI_CALL (UpdateColors, (hdc));
|
||||
SelectPalette (hdc, holdpal, TRUE);
|
||||
RealizePalette (hdc);
|
||||
}
|
||||
if (!ReleaseDC (impl->handle, hdc))
|
||||
WIN32_GDI_FAILED ("ReleaseDC");
|
||||
GDI_CALL (ReleaseDC, (impl->handle, hdc));
|
||||
}
|
||||
GDK_NOTE (COLORMAP, (top ? g_print ("\n") : (void) 0));
|
||||
}
|
||||
@ -2148,7 +2145,6 @@ gdk_event_translate (GdkDisplay *display,
|
||||
MINMAXINFO *mmi;
|
||||
HWND hwnd;
|
||||
HCURSOR hcursor;
|
||||
CHARSETINFO charset_info;
|
||||
BYTE key_state[256];
|
||||
HIMC himc;
|
||||
|
||||
@ -3246,7 +3242,7 @@ gdk_event_translate (GdkDisplay *display,
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl);
|
||||
mmi = (MINMAXINFO*) msg->lParam;
|
||||
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->ptMaxTrackSize.x, mmi->ptMaxTrackSize.y,
|
||||
mmi->ptMaxPosition.x, mmi->ptMaxPosition.y,
|
||||
@ -3285,7 +3281,7 @@ gdk_event_translate (GdkDisplay *display,
|
||||
{
|
||||
/* Don't call DefWindowProc() */
|
||||
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->ptMaxTrackSize.x, mmi->ptMaxTrackSize.y,
|
||||
mmi->ptMaxPosition.x, mmi->ptMaxPosition.y,
|
||||
|
@ -201,7 +201,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
obj = GDK_WINDOW_OBJECT (window);
|
||||
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),
|
||||
obj->x, obj->y,
|
||||
width, height, x, y));
|
||||
@ -214,11 +214,13 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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->y = y;
|
||||
@ -242,7 +244,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
|
||||
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),
|
||||
-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)
|
||||
{
|
||||
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),
|
||||
new_info.x, new_info.y,
|
||||
new_info.width, new_info.height,
|
||||
new_info.x, new_info.y));
|
||||
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
new_info.x, new_info.y,
|
||||
new_info.width, new_info.height,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER |
|
||||
(is_move ? 0 : SWP_NOMOVE) |
|
||||
(is_resize ? 0 : SWP_NOSIZE)))
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
(is_move ? "" : "|NOMOVE"),
|
||||
(is_resize ? "" : "|NOSIZE")));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
new_info.x, new_info.y,
|
||||
new_info.width, new_info.height,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER |
|
||||
(is_move ? 0 : SWP_NOMOVE) |
|
||||
(is_resize ? 0 : SWP_NOSIZE)));
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_SHOWNA)\n",
|
||||
GDK_NOTE (MISC, g_print ("... ShowWindow(%p, SW_SHOWNA)\n",
|
||||
GDK_WINDOW_HWND (window)));
|
||||
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)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_HIDE)\n",
|
||||
GDK_NOTE (MISC, g_print ("... ShowWindow(%p, SW_HIDE)\n",
|
||||
GDK_WINDOW_HWND (window)));
|
||||
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),
|
||||
new_info.x, new_info.y,
|
||||
new_info.width, new_info.height,
|
||||
new_info.x, new_info.y));
|
||||
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
new_info.x, new_info.y,
|
||||
new_info.width, new_info.height,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER |
|
||||
(is_move ? 0 : SWP_NOMOVE) |
|
||||
(is_resize ? 0 : SWP_NOSIZE)))
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
(is_move ? "" : "|NOMOVE"),
|
||||
(is_resize ? "" : "|NOSIZE")));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
new_info.x, new_info.y,
|
||||
new_info.width, new_info.height,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER |
|
||||
(is_move ? 0 : SWP_NOMOVE) |
|
||||
(is_resize ? 0 : SWP_NOSIZE)));
|
||||
|
||||
tmp_list = obj->children;
|
||||
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))
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_SHOWNA)\n",
|
||||
GDK_NOTE (MISC, g_print ("... ShowWindow(%p, SW_SHOWNA)\n",
|
||||
GDK_WINDOW_HWND (window)));
|
||||
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))
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_postmove: %s@+%d+%d\n"
|
||||
"...SetWindowPos(%dx%d@+%d+%d)\n",
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_postmove: %s@%+d%+d\n"
|
||||
"... SetWindowPos(%p,NULL,%d,%d,0,0,"
|
||||
"NOREDRAW|NOZORDER|NOACTIVATE|NOSIZE)\n",
|
||||
_gdk_win32_drawable_description (window),
|
||||
obj->x, obj->y,
|
||||
new_info.width, new_info.height,
|
||||
GDK_WINDOW_HWND (window),
|
||||
new_info.x, new_info.y));
|
||||
|
||||
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
|
||||
new_info.x, new_info.y,
|
||||
0, 0,
|
||||
SWP_NOREDRAW | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE))
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
|
||||
new_info.x, new_info.y,
|
||||
0, 0,
|
||||
SWP_NOREDRAW | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE));
|
||||
}
|
||||
|
||||
if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj))
|
||||
|
@ -490,7 +490,7 @@ _gdk_input_wintab_init_check (void)
|
||||
gdkdev->info.num_axes));
|
||||
for (i = 0; i < gdkdev->info.num_axes; i++)
|
||||
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,
|
||||
gdkdev->axes[i].xmin_value,
|
||||
gdkdev->axes[i].xmax_value,
|
||||
@ -762,7 +762,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
display = gdk_drawable_get_display (window);
|
||||
|
||||
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));
|
||||
|
||||
#else
|
||||
@ -791,12 +791,12 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
* moved or resized, see bug #151090. */
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@ -863,10 +863,10 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
|| !(x_grab_mask && masktest))
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("...grabber doesn't want it\n"));
|
||||
g_print ("... grabber doesn't want it\n"));
|
||||
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_unref(window);
|
||||
@ -880,7 +880,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
if (!GDK_WINDOW_IMPL_WIN32 (obj->impl)->extension_events_selected
|
||||
|| !(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))
|
||||
return FALSE;
|
||||
@ -890,7 +890,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
if (obj->event_mask & masktest)
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("...wants ordinary event, ignoring this\n"));
|
||||
g_print ("... wants ordinary event, ignoring this\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -904,7 +904,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
ScreenToClient (GDK_WINDOW_HWND (window), &pt);
|
||||
x = pt.x;
|
||||
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));
|
||||
goto dijkstra;
|
||||
}
|
||||
|
@ -892,7 +892,7 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
}
|
||||
|
||||
#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)));
|
||||
#endif
|
||||
|
||||
|
@ -927,7 +927,7 @@ _gdk_win32_key_to_string (LONG lParam)
|
||||
gchar *
|
||||
_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->left, rect->top);
|
||||
}
|
||||
@ -935,7 +935,7 @@ _gdk_win32_rect_to_string (const RECT *rect)
|
||||
gchar *
|
||||
_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->x, rect->y);
|
||||
}
|
||||
@ -943,7 +943,7 @@ _gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect)
|
||||
gchar *
|
||||
_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.y2 - rgn->extents.y1),
|
||||
rgn->extents.x1, rgn->extents.y1);
|
||||
|
@ -108,8 +108,7 @@ gdk_pixmap_impl_win32_finalize (GObject *object)
|
||||
GDK_NOTE (PIXMAP, g_print ("gdk_pixmap_impl_win32_finalize: %p\n",
|
||||
GDK_PIXMAP_HBITMAP (wrapper)));
|
||||
|
||||
if (!DeleteObject (GDK_PIXMAP_HBITMAP (wrapper)))
|
||||
WIN32_GDI_FAILED ("DeleteObject");
|
||||
GDI_CALL (DeleteObject, (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)
|
||||
SelectPalette (hdc, holdpal, FALSE);
|
||||
|
||||
if (!ReleaseDC (hwnd, hdc))
|
||||
WIN32_GDI_FAILED ("ReleaseDC");
|
||||
GDI_CALL (ReleaseDC, (hwnd, hdc));
|
||||
|
||||
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)
|
||||
{
|
||||
@ -311,7 +309,7 @@ gdk_pixmap_new (GdkDrawable *drawable,
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
static unsigned char mirror[256] = {
|
||||
static const unsigned char mirror[256] = {
|
||||
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
|
||||
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
|
||||
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
|
||||
|
@ -319,7 +319,7 @@ gdk_property_change (GdkWindow *window,
|
||||
if (data[i] == '\n')
|
||||
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 ())
|
||||
{
|
||||
@ -332,7 +332,7 @@ gdk_property_change (GdkWindow *window,
|
||||
|
||||
wclen++; /* Terminating 0 */
|
||||
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))
|
||||
{
|
||||
@ -340,7 +340,7 @@ gdk_property_change (GdkWindow *window,
|
||||
* some installed locale, use CF_TEXT and CF_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));
|
||||
}
|
||||
else
|
||||
@ -384,7 +384,7 @@ gdk_property_change (GdkWindow *window,
|
||||
}
|
||||
rtf = g_string_append (rtf, "}");
|
||||
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)))
|
||||
|
@ -253,7 +253,7 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
|
||||
* gdk_property_change will be called to store the clipboard
|
||||
* 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.window = owner;
|
||||
tmp_event.selection.send_event = FALSE;
|
||||
@ -423,7 +423,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
{
|
||||
length = GlobalSize (hdata);
|
||||
|
||||
GDK_NOTE (DND, g_print ("...CF_UNICODETEXT: %ld bytes\n",
|
||||
GDK_NOTE (DND, g_print ("... CF_UNICODETEXT: %ld bytes\n",
|
||||
length));
|
||||
|
||||
/* Strip out \r */
|
||||
@ -464,7 +464,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
{
|
||||
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));
|
||||
|
||||
_gdk_selection_property_store (requestor, target, 8,
|
||||
@ -488,7 +488,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
{
|
||||
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));
|
||||
|
||||
if ((hlcid = GetClipboardData (CF_LOCALE)) != NULL)
|
||||
@ -499,7 +499,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
buf, sizeof (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));
|
||||
}
|
||||
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 */
|
||||
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);
|
||||
if (data)
|
||||
|
@ -483,6 +483,7 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
gint attributes_mask,
|
||||
gboolean from_set_skip_taskbar_hint)
|
||||
{
|
||||
HWND hwndNew;
|
||||
HANDLE hparent;
|
||||
ATOM klass = 0;
|
||||
DWORD dwStyle = 0, dwExStyle;
|
||||
@ -602,7 +603,7 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
private->input_only = TRUE;
|
||||
draw_impl->colormap = gdk_screen_get_system_colormap (screen);
|
||||
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)
|
||||
@ -688,20 +689,18 @@ gdk_window_new_internal (GdkWindow *parent,
|
||||
|
||||
mbtitle = g_locale_from_utf8 (title, -1, NULL, NULL, NULL);
|
||||
|
||||
{
|
||||
HWND hwndNew =
|
||||
CreateWindowEx (dwExStyle,
|
||||
MAKEINTRESOURCE(klass),
|
||||
mbtitle,
|
||||
dwStyle,
|
||||
((attributes_mask & GDK_WA_X) ?
|
||||
impl->position_info.x - offset_x: CW_USEDEFAULT),
|
||||
impl->position_info.y - offset_y,
|
||||
window_width, window_height,
|
||||
hparent,
|
||||
NULL,
|
||||
_gdk_app_hmodule,
|
||||
window);
|
||||
hwndNew = CreateWindowEx (dwExStyle,
|
||||
MAKEINTRESOURCE(klass),
|
||||
mbtitle,
|
||||
dwStyle,
|
||||
((attributes_mask & GDK_WA_X) ?
|
||||
impl->position_info.x - offset_x : CW_USEDEFAULT),
|
||||
impl->position_info.y - offset_y,
|
||||
window_width, window_height,
|
||||
hparent,
|
||||
NULL,
|
||||
_gdk_app_hmodule,
|
||||
window);
|
||||
if (GDK_WINDOW_HWND (window) != hwndNew)
|
||||
{
|
||||
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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
g_object_ref (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,
|
||||
window_width, window_height,
|
||||
((attributes_mask & GDK_WA_X) ?
|
||||
@ -822,6 +821,11 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
|
||||
g_object_ref (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;
|
||||
}
|
||||
|
||||
@ -1066,8 +1070,7 @@ show_window_internal (GdkWindow *window,
|
||||
if (private->state & GDK_WINDOW_STATE_ABOVE)
|
||||
exstyle |= WS_EX_TOPMOST;
|
||||
|
||||
if (!SetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE, exstyle))
|
||||
WIN32_API_FAILED ("SetWindowLong");
|
||||
API_CALL (SetWindowLong, (GDK_WINDOW_HWND (window), GWL_EXSTYLE, exstyle));
|
||||
}
|
||||
|
||||
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
@ -1084,10 +1087,11 @@ show_window_internal (GdkWindow *window,
|
||||
if (raise)
|
||||
{
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOPMOST, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL
|
||||
|| GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
|
||||
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOPMOST,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL ||
|
||||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
|
||||
SetForegroundWindow (GDK_WINDOW_HWND (window));
|
||||
else
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
@ -1180,7 +1185,7 @@ gdk_window_move (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
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));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
|
||||
@ -1188,7 +1193,11 @@ gdk_window_move (GdkWindow *window,
|
||||
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
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);
|
||||
else
|
||||
{
|
||||
@ -1198,6 +1207,11 @@ gdk_window_move (GdkWindow *window,
|
||||
|
||||
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,
|
||||
x - _gdk_offset_x, y - _gdk_offset_y, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
|
||||
@ -1231,13 +1245,19 @@ gdk_window_resize (GdkWindow *window,
|
||||
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
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);
|
||||
else
|
||||
{
|
||||
RECT 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,
|
||||
0, 0,
|
||||
outer_rect.right - outer_rect.left,
|
||||
@ -1273,11 +1293,11 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
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),
|
||||
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);
|
||||
else
|
||||
{
|
||||
@ -1287,6 +1307,13 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
|
||||
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,
|
||||
x - _gdk_offset_x, y - _gdk_offset_y,
|
||||
outer_rect.right - outer_rect.left,
|
||||
@ -1377,7 +1404,7 @@ _gdk_windowing_window_clear_area (GdkWindow *window,
|
||||
if (height == 0)
|
||||
height = impl->height - y;
|
||||
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),
|
||||
width, height, x, y));
|
||||
hdc = GetDC (GDK_WINDOW_HWND (window));
|
||||
@ -1402,7 +1429,7 @@ _gdk_windowing_window_clear_area_e (GdkWindow *window,
|
||||
RECT rect;
|
||||
|
||||
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),
|
||||
width, height, x, y));
|
||||
|
||||
@ -1438,10 +1465,14 @@ gdk_window_lower (GdkWindow *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)));
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
@ -1468,7 +1499,7 @@ gdk_window_set_hints (GdkWindow *window,
|
||||
|
||||
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),
|
||||
min_width, min_height, max_width, max_height,
|
||||
x, y));
|
||||
@ -1604,7 +1635,7 @@ gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
size_hints.rcNormalPosition.left + geometry->base_width;
|
||||
size_hints.rcNormalPosition.bottom =
|
||||
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.top,
|
||||
size_hints.rcNormalPosition.right,
|
||||
@ -1691,7 +1722,7 @@ gdk_window_set_transient_for (GdkWindow *window,
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1815,7 +1846,7 @@ gdk_window_set_cursor (GdkWindow *window,
|
||||
*/
|
||||
if ((impl->hcursor = CopyCursor (hcursor)) == NULL)
|
||||
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));
|
||||
}
|
||||
|
||||
@ -1872,8 +1903,7 @@ gdk_window_set_cursor (GdkWindow *window,
|
||||
SetCursor (hcursor);
|
||||
}
|
||||
|
||||
GDK_NOTE (MISC, g_print ("...DestroyCursor (%p)\n",
|
||||
hprevcursor));
|
||||
GDK_NOTE (MISC, g_print ("... DestroyCursor (%p)\n", hprevcursor));
|
||||
|
||||
API_CALL (DestroyCursor, (hprevcursor));
|
||||
}
|
||||
@ -1937,7 +1967,7 @@ gdk_window_get_geometry (GdkWindow *window,
|
||||
if (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),
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
gdk_drawable_get_visual (window)->depth,
|
||||
@ -1975,7 +2005,7 @@ gdk_window_get_origin (GdkWindow *window,
|
||||
if (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),
|
||||
tx, ty));
|
||||
return return_val;
|
||||
@ -2006,7 +2036,7 @@ gdk_window_get_root_origin (GdkWindow *window,
|
||||
if (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));
|
||||
}
|
||||
|
||||
@ -2045,7 +2075,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
|
||||
rect->width = r.right - r.left;
|
||||
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),
|
||||
r.right - r.left, r.bottom - r.top,
|
||||
r.left, r.top));
|
||||
@ -2184,7 +2214,7 @@ _gdk_windowing_window_at_pointer (GdkDisplay *display,
|
||||
*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,
|
||||
hwnd,
|
||||
(window == NULL ? " NULL" : "")));
|
||||
@ -2671,7 +2701,8 @@ gdk_window_set_decorations (GdkWindow *window,
|
||||
style &= ~settable_bits, style |= bits;
|
||||
|
||||
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_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
|
||||
}
|
||||
@ -2740,7 +2771,8 @@ gdk_window_set_functions (GdkWindow *window,
|
||||
style &= ~settable_bits, style |= bits;
|
||||
|
||||
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_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
|
||||
}
|
||||
@ -3103,10 +3135,10 @@ gdk_window_fullscreen (GdkWindow *window)
|
||||
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
|
||||
(fi->style & ~WS_OVERLAPPEDWINDOW) | WS_POPUP);
|
||||
if (!SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP /*not MOST, taskswitch!*/,
|
||||
0, 0, width, height,
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
|
||||
0, 0, width, height,
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
|
||||
|
||||
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;
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, fi->style);
|
||||
if (!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,
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
|
||||
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,
|
||||
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
|
||||
|
||||
g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
|
||||
g_free (fi);
|
||||
|
||||
@ -3149,9 +3181,10 @@ gdk_window_set_keep_above (GdkWindow *window, gboolean setting)
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
{
|
||||
if (!SetWindowPos(GDK_WINDOW_HWND (window), setting ? HWND_TOPMOST : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE))
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
setting ? HWND_TOPMOST : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
|
||||
}
|
||||
else
|
||||
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 (!SetWindowPos(GDK_WINDOW_HWND (window), setting ? HWND_BOTTOM : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE))
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
setting ? HWND_BOTTOM : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
|
||||
}
|
||||
else
|
||||
gdk_synthesize_window_state (window,
|
||||
@ -3218,7 +3252,8 @@ gdk_window_set_modal_hint (GdkWindow *window,
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
modal ? HWND_TOPMOST : HWND_NOTOPMOST,
|
||||
0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE));
|
||||
0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE));
|
||||
}
|
||||
|
||||
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? */
|
||||
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
|
||||
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_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user