[gnome-panel/gtk3] Use GDK_WINDOW_XID instead of deprecated GDK_WINDOW_XWINDOW
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] Use GDK_WINDOW_XID instead of deprecated GDK_WINDOW_XWINDOW
- Date: Thu, 30 Dec 2010 10:47:45 +0000 (UTC)
commit ec1d200d170d1ab0c4a5081296ea9f082a6cad0d
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Wed Dec 29 22:28:48 2010 +0100
Use GDK_WINDOW_XID instead of deprecated GDK_WINDOW_XWINDOW
Required to build with recent GDK3.
https://bugzilla.gnome.org/show_bug.cgi?id=627455
applets/clock/clock-location-tile.c | 2 +-
applets/clock/clock.c | 2 +-
applets/notification_area/na-tray-child.c | 2 +-
applets/notification_area/na-tray-manager.c | 6 +++---
gnome-panel/panel-background-monitor.c | 2 +-
gnome-panel/panel-multiscreen.c | 2 +-
gnome-panel/panel-xutils.c | 6 +++---
gnome-panel/xstuff.c | 20 +++++++++-----------
libpanel-applet/panel-applet.c | 8 ++++----
9 files changed, 24 insertions(+), 26 deletions(-)
---
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index 7fe9b4d..5e6ba93 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -204,7 +204,7 @@ make_current (GtkWidget *widget, ClockLocationTile *tile)
GdkWindow *window = gtk_widget_get_window (toplevel);
if (window)
- xid = GDK_WINDOW_XWINDOW (window);
+ xid = GDK_WINDOW_XID (window);
}
clock_location_make_current (priv->location,
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 09efa38..f618084 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -2188,7 +2188,7 @@ location_start_element (GMarkupParseContext *context,
latitude, longitude, code, &prefs);
if (current && clock_location_is_current_timezone (loc))
- clock_location_make_current (loc, GDK_WINDOW_XWINDOW (gtk_widget_get_window (cd->applet)),
+ clock_location_make_current (loc, GDK_WINDOW_XID (gtk_widget_get_window (cd->applet)),
NULL, NULL, NULL);
data->cities = g_list_append (data->cities, loc);
diff --git a/applets/notification_area/na-tray-child.c b/applets/notification_area/na-tray-child.c
index 8625c9e..15a0c43 100644
--- a/applets/notification_area/na-tray-child.c
+++ b/applets/notification_area/na-tray-child.c
@@ -402,7 +402,7 @@ na_tray_child_force_redraw (NaTrayChild *child)
gtk_widget_get_allocation (widget, &allocation);
xev.xexpose.type = Expose;
- xev.xexpose.window = GDK_WINDOW_XWINDOW (plug_window);
+ xev.xexpose.window = GDK_WINDOW_XID (plug_window);
xev.xexpose.x = 0;
xev.xexpose.y = 0;
xev.xexpose.width = allocation.width;
diff --git a/applets/notification_area/na-tray-manager.c b/applets/notification_area/na-tray-manager.c
index e7abe3e..b5a11fd 100644
--- a/applets/notification_area/na-tray-manager.c
+++ b/applets/notification_area/na-tray-manager.c
@@ -600,7 +600,7 @@ na_tray_manager_set_orientation_property (NaTrayManager *manager)
SYSTEM_TRAY_ORIENTATION_VERT;
XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
orientation_atom,
XA_CARDINAL, 32,
PropModeReplace,
@@ -653,7 +653,7 @@ na_tray_manager_set_visual_property (NaTrayManager *manager)
data[0] = XVisualIDFromVisual (xvisual);
XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
visual_atom,
XA_VISUALID, 32,
PropModeReplace,
@@ -731,7 +731,7 @@ na_tray_manager_manage_screen_x11 (NaTrayManager *manager,
xev.data.l[0] = timestamp;
xev.data.l[1] = gdk_x11_atom_to_xatom_for_display (display,
manager->selection_atom);
- xev.data.l[2] = GDK_WINDOW_XWINDOW (window);
+ xev.data.l[2] = GDK_WINDOW_XID (window);
xev.data.l[3] = 0; /* manager specific data */
xev.data.l[4] = 0; /* manager specific data */
diff --git a/gnome-panel/panel-background-monitor.c b/gnome-panel/panel-background-monitor.c
index fc85e17..1c5c652 100644
--- a/gnome-panel/panel-background-monitor.c
+++ b/gnome-panel/panel-background-monitor.c
@@ -149,7 +149,7 @@ panel_background_monitor_connect_to_screen (PanelBackgroundMonitor *monitor,
G_CALLBACK (panel_background_monitor_changed), monitor);
monitor->gdkwindow = gdk_screen_get_root_window (screen);
- monitor->xwindow = gdk_x11_drawable_get_xid (monitor->gdkwindow);
+ monitor->xwindow = GDK_WINDOW_XID (monitor->gdkwindow);
gdk_window_add_filter (
monitor->gdkwindow, panel_background_monitor_xevent_filter, monitor);
diff --git a/gnome-panel/panel-multiscreen.c b/gnome-panel/panel-multiscreen.c
index 4ed76ae..89623e9 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -133,7 +133,7 @@ panel_multiscreen_get_randr_monitors_for_screen (GdkScreen *screen,
*/
xdisplay = GDK_SCREEN_XDISPLAY (screen);
- xroot = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen));
+ xroot = GDK_WINDOW_XID (gdk_screen_get_root_window (screen));
#if (RANDR_MAJOR > 1 || (RANDR_MAJOR == 1 && RANDR_MINOR >= 3))
if (have_randr_1_3) {
diff --git a/gnome-panel/panel-xutils.c b/gnome-panel/panel-xutils.c
index 4480f19..29f53d8 100644
--- a/gnome-panel/panel-xutils.c
+++ b/gnome-panel/panel-xutils.c
@@ -50,7 +50,7 @@ panel_xutils_set_window_type (GdkWindow *gdk_window,
g_return_if_fail (GDK_IS_WINDOW (gdk_window));
display = GDK_WINDOW_XDISPLAY (gdk_window);
- window = GDK_WINDOW_XWINDOW (gdk_window);
+ window = GDK_WINDOW_XID (gdk_window);
if (net_wm_window_type == None)
net_wm_window_type = XInternAtom (display,
@@ -113,7 +113,7 @@ panel_xutils_set_strut (GdkWindow *gdk_window,
g_return_if_fail (GDK_IS_WINDOW (gdk_window));
display = GDK_WINDOW_XDISPLAY (gdk_window);
- window = GDK_WINDOW_XWINDOW (gdk_window);
+ window = GDK_WINDOW_XID (gdk_window);
if (net_wm_strut == None)
net_wm_strut = XInternAtom (display, "_NET_WM_STRUT", False);
@@ -164,7 +164,7 @@ panel_warp_pointer (GdkWindow *gdk_window,
g_return_if_fail (GDK_IS_WINDOW (gdk_window));
display = GDK_WINDOW_XDISPLAY (gdk_window);
- window = GDK_WINDOW_XWINDOW (gdk_window);
+ window = GDK_WINDOW_XID (gdk_window);
gdk_error_trap_push ();
XWarpPointer (display, None, window, 0, 0, 0, 0, x, y);
diff --git a/gnome-panel/xstuff.c b/gnome-panel/xstuff.c
index db7354d..4de06fd 100644
--- a/gnome-panel/xstuff.c
+++ b/gnome-panel/xstuff.c
@@ -163,8 +163,7 @@ xstuff_is_compliant_wm (void)
int size;
xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
- root_window = GDK_WINDOW_XWINDOW (
- gdk_get_default_root_window ());
+ root_window = GDK_WINDOW_XID (gdk_get_default_root_window ());
/* FIXME this is totally broken; should be using
* gdk_net_wm_supports() on particular hints when we rely
@@ -218,7 +217,7 @@ xstuff_set_pos_size (GdkWindow *window, int x, int y, int w, int h)
gdk_error_trap_push ();
XSetWMNormalHints (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
&size_hints);
gdk_window_move_resize (window, x, y, w, h);
@@ -245,7 +244,7 @@ xstuff_set_wmspec_dock_hints (GdkWindow *window,
}
XChangeProperty (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
panel_atom_get ("_NET_WM_WINDOW_TYPE"),
XA_ATOM, 32, PropModeReplace,
(unsigned char *) atoms,
@@ -267,7 +266,7 @@ xstuff_set_wmspec_strut (GdkWindow *window,
vals [3] = bottom;
XChangeProperty (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
panel_atom_get ("_NET_WM_STRUT"),
XA_CARDINAL, 32, PropModeReplace,
(unsigned char *) vals, 4);
@@ -277,7 +276,7 @@ void
xstuff_delete_property (GdkWindow *window, const char *name)
{
Display *xdisplay = GDK_WINDOW_XDISPLAY (window);
- Window xwindow = GDK_WINDOW_XWINDOW (window);
+ Window xwindow = GDK_WINDOW_XID (window);
XDeleteProperty (xdisplay, xwindow,
panel_atom_get (name));
@@ -474,7 +473,7 @@ draw_zoom_animation (GdkScreen *gscreen,
int depth;
dpy = gdk_x11_display_get_xdisplay (gdk_screen_get_display (gscreen));
- root_win = gdk_x11_drawable_get_xid (gdk_screen_get_root_window (gscreen));
+ root_win = GDK_WINDOW_XID (gdk_screen_get_root_window (gscreen));
screen = gdk_screen_get_number (gscreen);
depth = DefaultDepth(dpy,screen);
@@ -630,8 +629,7 @@ xstuff_get_current_workspace (GdkScreen *screen)
int result;
int retval;
- root_window = gdk_x11_drawable_get_xid (
- gdk_screen_get_root_window (screen));
+ root_window = GDK_WINDOW_XID (gdk_screen_get_root_window (screen));
gdk_error_trap_push ();
result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)),
@@ -676,12 +674,12 @@ xstuff_grab_key_on_all_screens (int keycode,
if (grab)
XGrabKey (gdk_x11_display_get_xdisplay (display),
keycode, modifiers,
- gdk_x11_drawable_get_xid (root),
+ GDK_WINDOW_XID (root),
True, GrabModeAsync, GrabModeAsync);
else
XUngrabKey (gdk_x11_display_get_xdisplay (display),
keycode, modifiers,
- gdk_x11_drawable_get_xid (root));
+ GDK_WINDOW_XID (root));
}
}
diff --git a/libpanel-applet/panel-applet.c b/libpanel-applet/panel-applet.c
index 4820e36..d659474 100644
--- a/libpanel-applet/panel-applet.c
+++ b/libpanel-applet/panel-applet.c
@@ -709,7 +709,7 @@ panel_applet_request_focus (PanelApplet *applet,
display = gdk_screen_get_display (screen);
xdisplay = GDK_DISPLAY_XDISPLAY (display);
- xroot = GDK_WINDOW_XWINDOW (root);
+ xroot = GDK_WINDOW_XID (root);
panel_applet_init_atoms (xdisplay);
@@ -1072,8 +1072,8 @@ panel_applet_button_event (GtkWidget *widget,
}
xevent.xbutton.display = GDK_WINDOW_XDISPLAY (window);
- xevent.xbutton.window = GDK_WINDOW_XWINDOW (socket_window);
- xevent.xbutton.root = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window
+ xevent.xbutton.window = GDK_WINDOW_XID (socket_window);
+ xevent.xbutton.root = GDK_WINDOW_XID (gdk_screen_get_root_window
(gdk_window_get_screen (window)));
/*
* FIXME: the following might cause
@@ -1090,7 +1090,7 @@ panel_applet_button_event (GtkWidget *widget,
gdk_error_trap_push ();
XSendEvent (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (socket_window),
+ GDK_WINDOW_XID (socket_window),
False, NoEventMask, &xevent);
gdk_error_trap_pop_ignored ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]