[nautilus] Don't use GDK_DISPLAY ()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't use GDK_DISPLAY ()
- Date: Sun, 19 Sep 2010 17:51:35 +0000 (UTC)
commit b66ce0fd23500f9727c1aac93366430285575697
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Sep 19 12:31:27 2010 +0200
Don't use GDK_DISPLAY ()
libnautilus-private/nautilus-autorun.c | 3 ++-
src/file-manager/fm-desktop-icon-view.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libnautilus-private/nautilus-autorun.c b/libnautilus-private/nautilus-autorun.c
index 710ae76..bb00480 100644
--- a/libnautilus-private/nautilus-autorun.c
+++ b/libnautilus-private/nautilus-autorun.c
@@ -693,7 +693,8 @@ is_shift_pressed (void)
ret = FALSE;
gdk_error_trap_push ();
- status = XkbGetState (GDK_DISPLAY (), XkbUseCoreKbd, &state);
+ status = XkbGetState (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+ XkbUseCoreKbd, &state);
gdk_error_trap_pop ();
if (status == Success) {
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index 8f1b750..d1dfcfd 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -345,7 +345,7 @@ fm_desktop_icon_view_handle_middle_click (NautilusIconContainer *icon_container,
/* build an X event to represent the middle click. */
x_event.type = ButtonPress;
x_event.send_event = True;
- x_event.display = GDK_DISPLAY ();
+ x_event.display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
x_event.window = GDK_ROOT_WINDOW ();
x_event.root = GDK_ROOT_WINDOW ();
x_event.subwindow = 0;
@@ -359,7 +359,7 @@ fm_desktop_icon_view_handle_middle_click (NautilusIconContainer *icon_container,
x_event.same_screen = True;
/* Send it to the root window, the window manager will handle it. */
- XSendEvent (GDK_DISPLAY (), GDK_ROOT_WINDOW (), True,
+ XSendEvent (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_ROOT_WINDOW (), True,
ButtonPressMask, (XEvent *) &x_event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]