[nautilus/rendering-cleanup: 14/17] Don't use the deprecated GDK_DISPLAY
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/rendering-cleanup: 14/17] Don't use the deprecated GDK_DISPLAY
- Date: Thu, 16 Sep 2010 23:32:46 +0000 (UTC)
commit a6163040f8f4ed17e1d4cc6197b1e7c32a0f9d6c
Author: Christian Persch <chpe gnome org>
Date: Thu Sep 16 17:20:40 2010 +0200
Don't use the deprecated GDK_DISPLAY
src/file-manager/fm-desktop-icon-view.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index 8f1b750..e406eaa 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -330,6 +330,8 @@ fm_desktop_icon_view_handle_middle_click (NautilusIconContainer *icon_container,
FMDesktopIconView *desktop_icon_view)
{
XButtonEvent x_event;
+ GtkWidget *widget;
+ GdkDisplay *display;
/* During a mouse click we have the pointer and keyboard grab.
* We will send a fake event to the root window which will cause it
@@ -342,10 +344,13 @@ fm_desktop_icon_view_handle_middle_click (NautilusIconContainer *icon_container,
gdk_flush ();
g_signal_stop_emission_by_name (icon_container, "middle_click");
+ widget = GTK_WIDGET (icon_container);
+ display = gtk_widget_get_display (widget);
+
/* 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 (display);
x_event.window = GDK_ROOT_WINDOW ();
x_event.root = GDK_ROOT_WINDOW ();
x_event.subwindow = 0;
@@ -359,7 +364,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 (display), GDK_ROOT_WINDOW (), True,
ButtonPressMask, (XEvent *) &x_event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]