[Xfce4-commits] <xfce4-panel:devel> Use the pointer position from the event, not using gdk_display_get_pointer().

Nick Schermer nick at xfce.org
Tue Aug 11 20:28:19 CEST 2009


Updating branch refs/heads/devel
         to 3872396cefd6a5165291f827eef74e9429ecee26 (commit)
       from e0cb655c810bc843bb03b4aebe84d09a71fd9e2b (commit)

commit 3872396cefd6a5165291f827eef74e9429ecee26
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Feb 24 20:35:47 2009 +0100

    Use the pointer position from the event, not using gdk_display_get_pointer().

 panel/panel-window.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/panel/panel-window.c b/panel/panel-window.c
index 7ba2719..d0b442f 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -708,7 +708,6 @@ panel_window_motion_notify (GtkWidget      *widget,
 {
   PanelWindow         *window = PANEL_WINDOW (widget);
   gint                 clamp_x, clamp_y;
-  GdkScreen           *screen;
   gint                 window_width, window_height;
   gint                 window_x, window_y;
   GdkRectangle         area;
@@ -719,11 +718,9 @@ panel_window_motion_notify (GtkWidget      *widget,
 
   if (window->drag_motion)
     {
-      /* get the pointer position and current screen */
-      gdk_display_get_pointer (gtk_widget_get_display (widget), &screen, &window_x, &window_y, NULL);
-
-      /* make sure the window is on the correct screen */
-      gtk_window_set_screen (GTK_WINDOW (widget), screen);
+      /* get the pointer position */
+      window_x = event->x_root;
+      window_y = event->y_root;
 
       /* get the maximum panel area on this coordinate */
       panel_window_working_area (window, window_x, window_y, &area);



More information about the Xfce4-commits mailing list