[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/01: Fix window being draggable. (bug #11908)
noreply at xfce.org
noreply at xfce.org
Sun Jun 14 20:14:21 CEST 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit 2d3c03eacd78051d2ef8ee3b6a4e2bff4753680e
Author: Graeme Gott <graeme at gottcode.org>
Date: Sun Jun 14 14:09:38 2015 -0400
Fix window being draggable. (bug #11908)
---
panel-plugin/window.cpp | 36 ++++++++++++------------------------
1 file changed, 12 insertions(+), 24 deletions(-)
diff --git a/panel-plugin/window.cpp b/panel-plugin/window.cpp
index 2518d1a..7608668 100644
--- a/panel-plugin/window.cpp
+++ b/panel-plugin/window.cpp
@@ -643,17 +643,12 @@ gboolean WhiskerMenu::Window::on_enter_notify_event(GtkWidget*, GdkEvent* event)
return false;
}
- // Don't grab cursor over menu
- if ((crossing_event->x_root >= m_geometry.x)
- && (crossing_event->x_root < (m_geometry.x + m_geometry.width))
- && (crossing_event->y_root >= m_geometry.y)
- && (crossing_event->y_root < (m_geometry.y + m_geometry.height)))
- {
- if (gdk_pointer_is_grabbed())
- {
- gdk_pointer_ungrab(crossing_event->time);
- }
- }
+ gdk_pointer_grab(gtk_widget_get_window(GTK_WIDGET(m_window)), true,
+ GdkEventMask(
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+ GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK
+ ),
+ NULL, NULL, crossing_event->time);
return false;
}
@@ -669,19 +664,12 @@ gboolean WhiskerMenu::Window::on_leave_notify_event(GtkWidget*, GdkEvent* event)
return false;
}
- // Track mouse clicks outside of menu
- if ((crossing_event->x_root <= m_geometry.x)
- || (crossing_event->x_root >= m_geometry.x + m_geometry.width)
- || (crossing_event->y_root <= m_geometry.y)
- || (crossing_event->y_root >= m_geometry.y + m_geometry.height))
- {
- gdk_pointer_grab(gtk_widget_get_window(GTK_WIDGET(m_window)), true,
- GdkEventMask(
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
- GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK
- ),
- NULL, NULL, crossing_event->time);
- }
+ gdk_pointer_grab(gtk_widget_get_window(GTK_WIDGET(m_window)), true,
+ GdkEventMask(
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+ GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK
+ ),
+ NULL, NULL, crossing_event->time);
return false;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list