Fix dragging 'batt', 'cpu', 'monitors' plugins.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 17 Nov 2016 20:50:42 +0000 (22:50 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 17 Nov 2016 20:50:42 +0000 (22:50 +0200)
Relevant masks were missed on GtkDrawingArea widget in those plugins.

ChangeLog
plugins/batt/batt.c
plugins/cpu/cpu.c
plugins/monitors/monitors.c

index 60dd7e2..0ff202d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,8 +74,6 @@
 * Removed unwanted conversions with energy for charge in 'batt' plugin
     which will mess up tooltip indications, and may make rate/percentage
     calculations invalid.
-* Fixed broken panel menus for 'batt' and 'monitors' plugin - the items
-    for plugin (configure and delete) were missing.
 
 0.8.2
 -------------------------------------------------------------------------
index e6e7865..988d9fd 100644 (file)
@@ -465,7 +465,9 @@ static GtkWidget * constructor(LXPanel *panel, config_setting_t *settings)
 
     lx_b->box = GTK_CONTAINER(p);
     lx_b->drawingArea = gtk_drawing_area_new();
-    gtk_widget_add_events(lx_b->drawingArea, GDK_BUTTON_PRESS_MASK);
+    gtk_widget_add_events(lx_b->drawingArea, GDK_BUTTON_PRESS_MASK |
+                                             GDK_BUTTON_RELEASE_MASK |
+                                             GDK_BUTTON_MOTION_MASK);
 
     gtk_container_add(lx_b->box, lx_b->drawingArea);
 
index 4a83956..8cf3c09 100644 (file)
@@ -266,7 +266,8 @@ static GtkWidget *cpu_constructor(LXPanel *panel, config_setting_t *settings)
 
     /* Allocate drawing area as a child of top level widget. */
     c->da = gtk_drawing_area_new();
-    gtk_widget_add_events(c->da, GDK_BUTTON_PRESS_MASK);
+    gtk_widget_add_events(c->da, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+                                 GDK_BUTTON_MOTION_MASK);
     gtk_widget_set_size_request(c->da, 40, PANEL_HEIGHT_DEFAULT);
     gtk_container_add(GTK_CONTAINER(p), c->da);
 
index d9b6391..19b8472 100644 (file)
@@ -171,7 +171,8 @@ monitor_init(MonitorsPlugin *mp, Monitor *m, gchar *color)
     ENTER;
 
     m->da = gtk_drawing_area_new();
-    gtk_widget_add_events(m->da, GDK_BUTTON_PRESS_MASK);
+    gtk_widget_add_events(m->da, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+                                 GDK_BUTTON_MOTION_MASK);
     gtk_widget_set_size_request(m->da, DEFAULT_WIDTH, panel_get_height(mp->panel));
 
     monitor_set_foreground_color(mp, m, color);