summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcaja-private/caja-autorun.c3
-rw-r--r--src/file-manager/fm-desktop-icon-view.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/libcaja-private/caja-autorun.c b/libcaja-private/caja-autorun.c
index cf801b08..d78f402d 100644
--- a/libcaja-private/caja-autorun.c
+++ b/libcaja-private/caja-autorun.c
@@ -747,7 +747,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 ae9e4c02..37b88378 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -352,7 +352,7 @@ fm_desktop_icon_view_handle_middle_click (CajaIconContainer *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;
@@ -366,7 +366,7 @@ fm_desktop_icon_view_handle_middle_click (CajaIconContainer *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);
}