[Xfce4-commits] r29457 - in xfce4-panel/trunk: . plugins/launcher
Nick Schermer
nick at xfce.org
Sat Feb 7 07:54:55 CET 2009
Author: nick
Date: 2009-02-07 06:54:54 +0000 (Sat, 07 Feb 2009)
New Revision: 29457
Modified:
xfce4-panel/trunk/NEWS
xfce4-panel/trunk/plugins/launcher/launcher-exec.c
xfce4-panel/trunk/plugins/launcher/launcher-exec.h
xfce4-panel/trunk/plugins/launcher/launcher.c
Log:
Send the event time with startup notification instead
of zero, so focus stealing works properly.
Modified: xfce4-panel/trunk/NEWS
===================================================================
--- xfce4-panel/trunk/NEWS 2009-02-07 00:39:28 UTC (rev 29456)
+++ xfce4-panel/trunk/NEWS 2009-02-07 06:54:54 UTC (rev 29457)
@@ -2,6 +2,8 @@
======
- Block panel autohide if the widget is grabbed (bug #4597).
- Fix dragging to launcher submenu items (bug #4026).
+- Send the event time with startup notification instead
+ of zero, so focus stealing works properly.
4.5.99.1
========
Modified: xfce4-panel/trunk/plugins/launcher/launcher-exec.c
===================================================================
--- xfce4-panel/trunk/plugins/launcher/launcher-exec.c 2009-02-07 00:39:28 UTC (rev 29456)
+++ xfce4-panel/trunk/plugins/launcher/launcher-exec.c 2009-02-07 06:54:54 UTC (rev 29457)
@@ -92,7 +92,8 @@
GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;;
static gboolean launcher_exec_on_screen (GdkScreen *screen,
LauncherEntry *entry,
- GSList *list);
+ GSList *list,
+ guint32 event_time);
@@ -406,7 +407,8 @@
static gboolean
launcher_exec_on_screen (GdkScreen *screen,
LauncherEntry *entry,
- GSList *list)
+ GSList *list,
+ guint32 event_time)
{
#ifdef HAVE_LIBSTARTUP_NOTIFICATION
SnLauncherContext *sn_launcher = NULL;
@@ -460,7 +462,7 @@
if (entry->icon)
sn_launcher_context_set_icon_name (sn_launcher, entry->icon);
- sn_launcher_context_initiate (sn_launcher, g_get_prgname (), argv[0], CurrentTime);
+ sn_launcher_context_initiate (sn_launcher, g_get_prgname (), argv[0], event_time);
/* count environ items */
for (n = 0; listenv[n] != NULL; ++n)
@@ -595,7 +597,8 @@
void
launcher_execute (GdkScreen *screen,
LauncherEntry *entry,
- GSList *file_list)
+ GSList *file_list,
+ guint32 event_time)
{
GSList *li;
GSList fake;
@@ -624,13 +627,13 @@
fake.data = li->data;
/* spawn */
- proceed = launcher_exec_on_screen (screen, entry, &fake);
+ proceed = launcher_exec_on_screen (screen, entry, &fake, event_time);
}
}
else
{
/* spawn */
- launcher_exec_on_screen (screen, entry, file_list);
+ launcher_exec_on_screen (screen, entry, file_list, event_time);
}
}
@@ -638,7 +641,8 @@
void
launcher_execute_from_clipboard (GdkScreen *screen,
- LauncherEntry *entry)
+ LauncherEntry *entry,
+ guint32 event_time)
{
GtkClipboard *clipboard;
gchar *text = NULL;
@@ -676,7 +680,7 @@
if (G_LIKELY (filenames))
{
/* run the command with argument from clipboard */
- launcher_execute (screen, entry, filenames);
+ launcher_execute (screen, entry, filenames, event_time);
/* cleanup */
launcher_free_filenames (filenames);
Modified: xfce4-panel/trunk/plugins/launcher/launcher-exec.h
===================================================================
--- xfce4-panel/trunk/plugins/launcher/launcher-exec.h 2009-02-07 00:39:28 UTC (rev 29456)
+++ xfce4-panel/trunk/plugins/launcher/launcher-exec.h 2009-02-07 06:54:54 UTC (rev 29457)
@@ -22,8 +22,10 @@
void launcher_execute (GdkScreen *screen,
LauncherEntry *entry,
- GSList *file_list) G_GNUC_INTERNAL;
+ GSList *file_list,
+ guint32 event_time) G_GNUC_INTERNAL;
void launcher_execute_from_clipboard (GdkScreen *screen,
- LauncherEntry *entry) G_GNUC_INTERNAL;
+ LauncherEntry *entry,
+ guint32 event_time) G_GNUC_INTERNAL;
#endif /* !__XFCE_PANEL_EXEC_H__ */
Modified: xfce4-panel/trunk/plugins/launcher/launcher.c
===================================================================
--- xfce4-panel/trunk/plugins/launcher/launcher.c 2009-02-07 00:39:28 UTC (rev 29456)
+++ xfce4-panel/trunk/plugins/launcher/launcher.c 2009-02-07 06:54:54 UTC (rev 29457)
@@ -457,9 +457,9 @@
/* execute the command on button 1 and 2 */
if (event->button == 1)
- launcher_execute (screen, entry, NULL);
+ launcher_execute (screen, entry, NULL, event->time);
else if (event->button == 2)
- launcher_execute_from_clipboard (screen, entry);
+ launcher_execute_from_clipboard (screen, entry, event->time);
}
return FALSE;
@@ -492,7 +492,7 @@
entry = g_list_first (launcher->entries)->data;
/* execute the entry with the filenames */
- launcher_execute (gtk_widget_get_screen (widget), entry, filenames);
+ launcher_execute (gtk_widget_get_screen (widget), entry, filenames, time_);
/* cleanup */
launcher_free_filenames (filenames);
@@ -651,9 +651,9 @@
if (G_LIKELY (entry))
{
if (event->button == 1)
- launcher_execute (screen, entry, NULL);
+ launcher_execute (screen, entry, NULL, event->time);
else if (event->button == 2)
- launcher_execute_from_clipboard (screen, entry);
+ launcher_execute_from_clipboard (screen, entry, event->time);
/* move the item to the first position in the list */
if (launcher->move_first
@@ -703,7 +703,7 @@
if (G_LIKELY (filenames))
{
/* execute the entry with the filenames */
- launcher_execute (gtk_widget_get_screen (widget), entry, filenames);
+ launcher_execute (gtk_widget_get_screen (widget), entry, filenames, time_);
/* cleanup */
launcher_free_filenames (filenames);
More information about the Xfce4-commits
mailing list