[nautilus/rendering-cleanup: 11/15] Don't use the deprecated GDK_DISPLAY
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/rendering-cleanup: 11/15] Don't use the deprecated GDK_DISPLAY
- Date: Sun, 26 Sep 2010 18:14:07 +0000 (UTC)
commit 5982435b75736aac5f6bbb3385b6df4be31b9eba
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 11181bb..aa380f9 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_XDISPLAY (gdk_display_get_default ());
+ 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_XDISPLAY (gdk_display_get_default ()), 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]