[SF#731] Fix wrong task button activation on not processed drag of button.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 2 May 2015 15:31:42 +0000 (18:31 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 2 May 2015 15:31:42 +0000 (18:31 +0300)
This might happen if drag started at button edge so treshold wasn't reached.

ChangeLog
plugins/launchtaskbar.c

index 03ab689..87ca63d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
 * Fixed initial icon on 'volumealsa' to show real state instead of muted.
 * Fixed 'dclock' updating that it will show time on start, not just on
     next second change. It would create impression it's slow otherwise.
+* Fixed wrong task button activation on not processed drag of button.
 
 0.8.0
 -------------------------------------------------------------------------
index 732b540..062e149 100644 (file)
@@ -2598,7 +2598,10 @@ static gboolean taskbar_button_press_event(GtkWidget * widget, GdkEventButton *
 /* Handler for "button-release-event" event from taskbar button. */
 static gboolean taskbar_button_release_event(GtkWidget * widget, GdkEventButton * event, Task * tk)
 {
-    if (!tk->tb->dnd_task_moving)
+    if (!tk->tb->dnd_task_moving && tk->entered_state)
+        /* SF bug#731: don't process button release with DND. Also if button was
+           released outside of widget but DND wasn't activated: this might happen
+           if drag started at edge of button so drag treshold wasn't reached. */
         return taskbar_task_control_event(widget, event, tk, FALSE);
     return TRUE;
 }