[drwright] Use gdk_x11_window_foreign_new_for_display()
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [drwright] Use gdk_x11_window_foreign_new_for_display()
- Date: Wed, 2 Feb 2011 19:46:14 +0000 (UTC)
commit b8e826da98e283e89525683043578311ac7ab463
Author: Christian Persch <chpe gnome org>
Date: Wed Feb 2 20:33:55 2011 +0100
Use gdk_x11_window_foreign_new_for_display()
Fixes the build with latest gtk3.
src/drw-selection.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/drw-selection.c b/src/drw-selection.c
index 9607df9..d2719c2 100644
--- a/src/drw-selection.c
+++ b/src/drw-selection.c
@@ -70,15 +70,20 @@ drw_selection_clear (GtkWidget *widget,
static gboolean
drw_selection_find_existing (DrwSelection *drw_selection)
{
- Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
+ GdkDisplay *display;
+ Display *xdisplay;
Window old;
+ display = gdk_display_get_default ();
+ xdisplay = GDK_DISPLAY_XDISPLAY (display);
+
gdk_error_trap_push ();
old = XGetSelectionOwner (xdisplay,
gdk_x11_get_xatom_by_name (SELECTION_NAME));
if (old) {
XSelectInput (xdisplay, old, StructureNotifyMask);
- drw_selection->owner_window = gdk_window_foreign_new (old);
+ drw_selection->owner_window =
+ gdk_x11_window_foreign_new_for_display (display, old);
}
XSync (xdisplay, False);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]