[Xfce4-commits] [xfce/xfdesktop] 06/34: Remove unused code

noreply at xfce.org noreply at xfce.org
Sun Apr 16 07:06:40 CEST 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit 626def6506a87e3b0cefd6bc880acb99f45de3db
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Mon Feb 27 10:09:55 2017 +0300

    Remove unused code
    
    xfdesktop_popup_keyboard_grab_available won't be needed anymore.
    If we need to wait to popup a menu in the future we can use
    xfce_gtk_menu_popup_until_mapped
---
 common/xfdesktop-common.c | 39 ---------------------------------------
 common/xfdesktop-common.h |  2 --
 2 files changed, 41 deletions(-)

diff --git a/common/xfdesktop-common.c b/common/xfdesktop-common.c
index 33a70e5..a96e6ea 100644
--- a/common/xfdesktop-common.c
+++ b/common/xfdesktop-common.c
@@ -153,45 +153,6 @@ xfce_translate_image_styles(gint input)
     return style;
 }
 
-/* Code taken from xfwm4/src/menu.c:grab_available().  This should fix the case
- * where binding 'xfdesktop -menu' to a keyboard shortcut sometimes works and
- * sometimes doesn't.  Credit for this one goes to Olivier.
- * Returns the grab time if successful, 0 on failure.
- */
-guint32
-xfdesktop_popup_keyboard_grab_available(GdkWindow *win)
-{
-    GdkGrabStatus grab;
-    gboolean grab_failed = FALSE;
-    guint32 timestamp;
-    gint i = 0;
-
-    TRACE("entering");
-
-    timestamp = gtk_get_current_event_time();
-
-    grab = gdk_keyboard_grab(win, TRUE, timestamp);
-
-    while((i++ < 2500) && (grab_failed = ((grab != GDK_GRAB_SUCCESS))))
-    {
-        TRACE ("keyboard grab not available yet, reason: %d, waiting... (%i)", grab, i);
-        if(grab == GDK_GRAB_INVALID_TIME)
-            break;
-
-        g_usleep (100);
-        if(grab != GDK_GRAB_SUCCESS) {
-            grab = gdk_keyboard_grab(win, TRUE, timestamp);
-        }
-    }
-
-    if (grab == GDK_GRAB_SUCCESS) {
-        gdk_keyboard_ungrab(timestamp);
-    } else {
-        timestamp = 0;
-    }
-
-    return timestamp;
-}
 
 
 /*
diff --git a/common/xfdesktop-common.h b/common/xfdesktop-common.h
index 59aab6f..b056762 100644
--- a/common/xfdesktop-common.h
+++ b/common/xfdesktop-common.h
@@ -97,8 +97,6 @@ gchar *xfdesktop_get_file_mimetype(const gchar *file);
 
 gint xfce_translate_image_styles(gint input);
 
-guint32 xfdesktop_popup_keyboard_grab_available(GdkWindow *win);
-
 gchar* xfdesktop_remove_whitspaces(gchar* str);
 
 #if defined(G_HAVE_ISO_VARARGS)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list