2011-10-29 [colin] 3.7.10cvs57
authorColin Leroy <colin@colino.net>
Sat, 29 Oct 2011 13:54:29 +0000 (13:54 +0000)
committerColin Leroy <colin@colino.net>
Sat, 29 Oct 2011 13:54:29 +0000 (13:54 +0000)
* src/addr_compl.c
Fix focus of completion window with gnome shell

ChangeLog
PATCHSETS
configure.ac
src/addr_compl.c

index ffd0efd..46d0b78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-29 [colin]     3.7.10cvs57
+
+       * src/addr_compl.c
+               Fix focus of completion window with gnome shell
+
 2011-10-29 [colin]     3.7.10cvs56
 
        * src/folderview.c
index 8d02e45..6594be3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.588 -r 1.382.2.589 src/compose.c;  ) > 3.7.10cvs54.patchset
 ( cvs diff -u -r 1.17.2.45 -r 1.17.2.46 src/alertpanel.c;  cvs diff -u -r 1.274.2.332 -r 1.274.2.333 src/mainwindow.c;  ) > 3.7.10cvs55.patchset
 ( cvs diff -u -r 1.207.2.224 -r 1.207.2.225 src/folderview.c;  ) > 3.7.10cvs56.patchset
+( cvs diff -u -r 1.27.2.58 -r 1.27.2.59 src/addr_compl.c;  ) > 3.7.10cvs57.patchset
index c9cd26a..9a7d432 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=56
+EXTRA_VERSION=57
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index b2b89a5..e2e5673 100644 (file)
@@ -849,13 +849,20 @@ static void addrcompl_resize_window( CompletionWindow *cw ) {
        gtk_widget_hide_all( cw->window );
        gtk_widget_show_all( cw->window );
        gtk_widget_size_request( cw->list_view, &r );
-
+printf("%d  + %d < %d\n", y, r.height, gdk_screen_height());
        /* Adjust window height to available screen space */
-       if( ( y + r.height ) > gdk_screen_height() ) {
-               gtk_window_set_resizable(GTK_WINDOW(cw->window), FALSE);
-               gtk_widget_set_size_request( cw->window, width, gdk_screen_height() - y );
-       } else
-               gtk_widget_set_size_request(cw->window, width, r.height);
+       if( y + r.height > gdk_screen_height())
+               r.height = gdk_screen_height() - y;
+
+       gtk_widget_set_size_request(cw->window, width, r.height);
+
+       gdk_pointer_grab(gtk_widget_get_window(cw->window), TRUE,
+                        GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK |
+                        GDK_BUTTON_RELEASE_MASK,
+                        NULL, NULL, GDK_CURRENT_TIME);
+       gdk_keyboard_grab(gtk_widget_get_window(cw->window), FALSE, GDK_CURRENT_TIME);
+       gtk_grab_add(cw->window);
+
 }
 
 static GdkPixbuf *group_pixbuf = NULL;
@@ -1370,13 +1377,8 @@ static void address_completion_create_completion_window( GtkEntry *entry_ )
                         GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK |
                         GDK_BUTTON_RELEASE_MASK,
                         NULL, NULL, GDK_CURRENT_TIME);
+       gdk_keyboard_grab(gtk_widget_get_window(window), FALSE, GDK_CURRENT_TIME);
        gtk_grab_add( window );
-
-       /* XXX: GTK2 too??? 
-        *
-        * GTK1: this gets rid of the irritating focus rectangle that doesn't
-        * follow the selection */
-       gtkut_widget_set_can_focus(list_view, FALSE);
 }
 
 /**