[maemo-commits] [maemo-commits] r14412 - in projects/haf/trunk/hildon-desktop: . libhildondesktop libhildonwm src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Oct 10 20:17:11 EEST 2007
Author: moimart
Date: 2007-10-10 18:58:00 +0300 (Wed, 10 Oct 2007)
New Revision: 14412

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c
   projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c
   projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c
Log:
2007-10-10  Moises Martinez <moises.martinez at nokia.com>

        * libhildonwm/hd-keys.c: (hd_keys_handle_keypress):
        - Trap possible X errors.
	* ChangeLog updated.



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-10-10 15:31:11 UTC (rev 14411)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-10-10 15:58:00 UTC (rev 14412)
@@ -1,3 +1,8 @@
+2007-10-10  Moises Martinez <moises.martinez at nokia.com>
+
+	* libhildonwm/hd-keys.c: (hd_keys_handle_keypress):
+	- Trap possible X errors.
+
 2007-10-10  Johan Bilien  <johan.bilien at nokia.com>
 
 	* configure.ac: 0.0.44

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c	2007-10-10 15:31:11 UTC (rev 14411)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c	2007-10-10 15:58:00 UTC (rev 14412)
@@ -979,7 +979,7 @@
   }
 }
 
-#ifdef HAVE_XTEST
+#if defined(HAVE_XTEST) && defined(MAEMO_CHANGES)
 static void 
 hildon_desktop_popup_menu_fake_button_event (GdkEventButton *event, gboolean press)
 {

Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c	2007-10-10 15:31:11 UTC (rev 14411)
+++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-keys.c	2007-10-10 15:58:00 UTC (rev 14412)
@@ -787,20 +787,25 @@
   while (item)
   {
     HDKeyShortcut *shortcut = (HDKeyShortcut *)item->data;
+    KeySym keysym;
+  
+    gdk_error_trap_push ();
+   
+    keysym = XKeycodeToKeysym(GDK_DISPLAY(),keycode,shortcut->index);
 
-    hd_wm_debug ("%i vs %i, %li vs %li",
-	     shortcut->mod_mask, mod_mask,
-	     shortcut->keysym, XKeycodeToKeysym(GDK_DISPLAY(), keycode, 0));
-
-    if (shortcut->mod_mask == mod_mask &&  
-	shortcut->keysym == XKeycodeToKeysym(GDK_DISPLAY(),keycode,shortcut->index))
+    gdk_flush ();
+    
+    if (gdk_error_trap_pop ())
+      continue;
+		    
+    if (shortcut->mod_mask == mod_mask && shortcut->keysym == keysym)
     {
       return shortcut;
     }
     
     item = g_slist_next(item);
   }
-
+  
   return NULL;
 } 
 

Modified: projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c	2007-10-10 15:31:11 UTC (rev 14411)
+++ projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c	2007-10-10 15:58:00 UTC (rev 14412)
@@ -2346,8 +2346,9 @@
   }
   else if (GTK_WIDGET_VISIBLE (GTK_BIN (switcher->priv->toggle_button)->child))
   {
+#ifdef MAEMO_CHANGES	  
     gtk_window_close_other_temporaries (GTK_WINDOW (switcher->priv->popup_window));
-
+#endif
     gtk_toggle_button_set_active
       (GTK_TOGGLE_BUTTON (switcher->priv->toggle_button), TRUE);
   }


More information about the maemo-commits mailing list