2 src/ui/liferea_shell.c | 14 ++++++++++++--
3 src/ui/ui_tray.c | 5 ++++-
4 2 files changed, 16 insertions(+), 3 deletions(-)
6 Index: liferea-1.6.0~rc6/src/ui/ui_tray.c
7 ===================================================================
8 --- liferea-1.6.0~rc6.orig/src/ui/ui_tray.c
9 +++ liferea-1.6.0~rc6/src/ui/ui_tray.c
15 /* a click on the systray icon should show the program window
16 if invisible or hide it if visible */
18 tray_icon_pressed (GtkWidget *button, GdkEventButton *event, EggTrayIcon *icon)
21 + if ((event->type == GDK_2BUTTON_PRESS) || (event->type == GDK_3BUTTON_PRESS))
22 + return; /* ignore double and triple clicks */
24 switch (event->button) {
26 liferea_shell_toggle_visibility ();
29 ui_popup_systray_menu (event->button, event->time);
32 Index: liferea-1.6.0~rc6/src/ui/liferea_shell.c
33 ===================================================================
34 --- liferea-1.6.0~rc6.orig/src/ui/liferea_shell.c
35 +++ liferea-1.6.0~rc6/src/ui/liferea_shell.c
36 @@ -1348,18 +1348,28 @@
37 gtk_window_present (shell->priv->window);
41 liferea_shell_toggle_visibility (void)
43 GtkWidget *mainwindow = GTK_WIDGET (shell->priv->window);
45 - if ((gdk_window_get_state (mainwindow->window) & GDK_WINDOW_STATE_ICONIFIED) ||
46 - !GTK_WIDGET_VISIBLE (mainwindow)) {
47 + if(gdk_window_get_state(GTK_WIDGET(mainwindow)->window) & GDK_WINDOW_STATE_ICONIFIED) {
48 + /* The window is either iconified, or on another workspace */
49 + /* Raise it in one click */
50 + if (GTK_WIDGET_VISIBLE(mainwindow)) {
51 + liferea_shell_save_position ();
52 + gtk_widget_hide(mainwindow);
54 + liferea_shell_restore_position();
55 + gtk_window_present(GTK_WINDOW(mainwindow));
57 + else if(!GTK_WIDGET_VISIBLE(mainwindow)) {
58 + /* The window is neither iconified nor on another workspace, but is not visible */
59 liferea_shell_restore_position ();
60 gtk_window_present (shell->priv->window);
62 liferea_shell_save_position ();
63 gtk_widget_hide (mainwindow);