[Xfce4-commits] <xfce4-appfinder:master> Center exo-desktop-item-edit on window.
Nick Schermer
noreply at xfce.org
Wed Dec 28 13:42:01 CET 2011
Updating branch refs/heads/master
to bba57c986fc125c36101cc2a31d8f9aec2228a5e (commit)
from b08a49041c5ef512d53452b127415c0c661bedab (commit)
commit bba57c986fc125c36101cc2a31d8f9aec2228a5e
Author: Nick Schermer <nick at xfce.org>
Date: Wed Dec 28 13:38:31 2011 +0100
Center exo-desktop-item-edit on window.
src/appfinder-window.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/appfinder-window.c b/src/appfinder-window.c
index bafb00a..e82b4db 100644
--- a/src/appfinder-window.c
+++ b/src/appfinder-window.c
@@ -40,6 +40,13 @@
#include <src/appfinder-actions.h>
#include <src/appfinder-private.h>
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#define APPFINDER_WIDGET_XID(widget) ((guint) GDK_WINDOW_XID (GDK_WINDOW (GTK_WIDGET (widget)->window)))
+#else
+#define APPFINDER_WIDGET_XID(widget) (0)
+#endif
+
#define DEFAULT_WINDOW_WIDTH 400
@@ -741,7 +748,8 @@ xfce_appfinder_window_popup_menu_edit (GtkWidget *mi,
if (uri == NULL)
return;
- cmd = g_strdup_printf ("exo-desktop-item-edit '%s'", uri);
+ cmd = g_strdup_printf ("exo-desktop-item-edit --xid=0x%x '%s'",
+ APPFINDER_WIDGET_XID (window), uri);
if (!g_spawn_command_line_async (cmd, &error))
{
xfce_dialog_show_error (GTK_WINDOW (window), error, _("Failed to launch desktop item editor"));
More information about the Xfce4-commits
mailing list