diff options
Diffstat (limited to 'src/common/helper.c')
-rw-r--r-- | src/common/helper.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/common/helper.c b/src/common/helper.c index d1c51b01..1a67bac9 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -56,6 +56,8 @@ static GtkWidget * infoWindow; | |||
56 | 56 | ||
57 | static GtkWidget * infoWindowTextView; | 57 | static GtkWidget * infoWindowTextView; |
58 | 58 | ||
59 | static GdkWindowState main_window_state; | ||
60 | |||
59 | /** | 61 | /** |
60 | * the main thread | 62 | * the main thread |
61 | */ | 63 | */ |
@@ -598,5 +600,23 @@ char * validate_utf8(char * msg) { | |||
598 | return msg; | 600 | return msg; |
599 | } | 601 | } |
600 | 602 | ||
603 | /** | ||
604 | * Gtk callback to save the main window state (tray icon use) | ||
605 | */ | ||
606 | void saveMainWindowState(GtkWidget *main_window, | ||
607 | GdkEventWindowState *event, | ||
608 | gpointer user_data) | ||
609 | { | ||
610 | main_window_state = (*event).new_window_state; | ||
611 | return; | ||
612 | } | ||
613 | |||
614 | /** | ||
615 | * Get the last main window state when restoring (tray icon use) | ||
616 | */ | ||
617 | GdkWindowState getMainWindowState() | ||
618 | { | ||
619 | return main_window_state; | ||
620 | } | ||
601 | 621 | ||
602 | /* end of helper.c */ | 622 | /* end of helper.c */ |