[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-461-g96c3ac0

ticho at claws-mail.org ticho at claws-mail.org
Mon Nov 5 23:08:48 CET 2018


The branch, gtk3 has been updated
       via  96c3ac0854314fe38483214bf9ceea5e7b59f880 (commit)
      from  a6d209b8e9a12fa404161ec0af4c2b021e90b5fd (commit)

Summary of changes:
 src/gtk/gtkcmclist.c |   31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)


- Log -----------------------------------------------------------------
commit 96c3ac0854314fe38483214bf9ceea5e7b59f880
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Nov 5 23:07:50 2018 +0100

    Fix GtkCMCList scrollbar sometimes being out of sync immediately after widget is realized.
    
    This is done by setting different GdkEvent masks for different
    GDK windows within the widget.

diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index 3968e82..0da9078 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -4611,6 +4611,7 @@ gtk_cmclist_realize (GtkWidget *widget)
   GList *list;
   gint attributes_mask;
   gint border_width;
+  gint event_mask;
   gint i;
   gint j;
 
@@ -4631,16 +4632,13 @@ gtk_cmclist_realize (GtkWidget *widget)
   attributes.height = allocation.height - border_width * 2;
   attributes.wclass = GDK_INPUT_OUTPUT;
   attributes.visual = gtk_widget_get_visual (widget);
-  attributes.event_mask = gtk_widget_get_events (widget);
-  attributes.event_mask |= (GDK_SCROLL_MASK |
-          GDK_SMOOTH_SCROLL_MASK |
-          GDK_POINTER_MOTION_MASK |
-          GDK_EXPOSURE_MASK |
-			    GDK_BUTTON_PRESS_MASK |
-			    GDK_BUTTON_RELEASE_MASK |
-			    GDK_KEY_RELEASE_MASK);
+
+  event_mask = gtk_widget_get_events (widget);
   attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
 
+  attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
+
+
   /* main window */
   window = gdk_window_new (gtk_widget_get_parent_window (widget),
 				   &attributes, attributes_mask);
@@ -4685,6 +4683,13 @@ gtk_cmclist_realize (GtkWidget *widget)
 		  clist->column_title_area.height);
   attributes.width = clist->clist_window_width;
   attributes.height = clist->clist_window_height;
+  attributes.event_mask = event_mask |
+    GDK_SCROLL_MASK |
+    GDK_SMOOTH_SCROLL_MASK |
+    GDK_POINTER_MOTION_MASK |
+    GDK_KEY_RELEASE_MASK |
+    GDK_BUTTON_PRESS_MASK |
+    GDK_BUTTON_RELEASE_MASK;
   
   clist->clist_window = gdk_window_new (window, &attributes,
 					attributes_mask);
@@ -4698,10 +4703,11 @@ gtk_cmclist_realize (GtkWidget *widget)
 
   /* create resize windows */
   attributes.wclass = GDK_INPUT_ONLY;
-  attributes.event_mask = (GDK_BUTTON_PRESS_MASK |
-			   GDK_BUTTON_RELEASE_MASK |
-			   GDK_POINTER_MOTION_MASK |
-			   GDK_POINTER_MOTION_HINT_MASK);
+  attributes.event_mask = event_mask |
+    GDK_BUTTON_PRESS_MASK |
+    GDK_BUTTON_RELEASE_MASK |
+    GDK_POINTER_MOTION_MASK |
+    GDK_POINTER_MOTION_HINT_MASK;
   attributes_mask = GDK_WA_CURSOR;
   attributes.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
 						  GDK_SB_H_DOUBLE_ARROW);
@@ -4711,6 +4717,7 @@ gtk_cmclist_realize (GtkWidget *widget)
   attributes.y = 0;
   attributes.width = 0;
   attributes.height = 0;
+  attributes.event_mask = event_mask;
 
   for (i = 0; i < clist->columns; i++)
     {

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list