summaryrefslogtreecommitdiffstats
path: root/app/gui
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 08:16:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 08:16:47 +0000
commit74f0d9eb037dc24bdfd1f0f325e483e380451d32 (patch)
treefaaaf44f426c20626c05034846c0b481c0e54983 /app/gui
parentAdding upstream version 2.10.36. (diff)
downloadgimp-upstream.tar.xz
gimp-upstream.zip
Adding upstream version 2.10.38.upstream/2.10.38upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--app/gui/gui.c19
-rw-r--r--app/gui/splash.c17
2 files changed, 36 insertions, 0 deletions
diff --git a/app/gui/gui.c b/app/gui/gui.c
index e5928eb..ef548f5 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -83,6 +83,12 @@
#include "splash.h"
#include "themes.h"
+#ifdef G_OS_WIN32
+#include <windef.h>
+#include <winbase.h>
+#include <windows.h>
+#endif
+
#ifdef GDK_WINDOWING_QUARTZ
#import <AppKit/AppKit.h>
#include <gtkosxapplication.h>
@@ -599,6 +605,11 @@ gui_restore_after_callback (Gimp *gimp,
{
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (gimp->config);
GimpDisplay *display;
+#ifdef G_OS_WIN32
+ STARTUPINFO StartupInfo;
+
+ GetStartupInfo (&StartupInfo);
+#endif
if (gimp->be_verbose)
g_print ("INIT: %s\n", G_STRFUNC);
@@ -740,6 +751,14 @@ gui_restore_after_callback (Gimp *gimp,
}
#endif /* GDK_WINDOWING_QUARTZ */
+#ifdef G_OS_WIN32
+ /* Prevents window from reappearing on start-up if the user
+ * requested it to be minimized via window hints
+ */
+ if (StartupInfo.wShowWindow != SW_SHOWMINIMIZED &&
+ StartupInfo.wShowWindow != SW_SHOWMINNOACTIVE &&
+ StartupInfo.wShowWindow != SW_MINIMIZE)
+#endif
/* move keyboard focus to the display */
gtk_window_present (GTK_WINDOW (toplevel));
}
diff --git a/app/gui/splash.c b/app/gui/splash.c
index aec664e..23c0505 100644
--- a/app/gui/splash.c
+++ b/app/gui/splash.c
@@ -35,6 +35,11 @@
#include "gimp-intl.h"
+#ifdef G_OS_WIN32
+#include <windef.h>
+#include <winbase.h>
+#include <windows.h>
+#endif
#define MEASURE_UPPER "1235678901234567890"
#define MEASURE_LOWER "12356789012345678901234567890"
@@ -118,6 +123,11 @@ splash_create (gboolean be_verbose,
PangoRectangle ink;
gint max_width;
gint max_height;
+#ifdef G_OS_WIN32
+ STARTUPINFO StartupInfo;
+
+ GetStartupInfo (&StartupInfo);
+#endif
g_return_if_fail (splash == NULL);
g_return_if_fail (GDK_IS_SCREEN (screen));
@@ -219,6 +229,13 @@ splash_create (gboolean be_verbose,
gtk_widget_show (splash->window);
+#ifdef G_OS_WIN32
+ if (StartupInfo.wShowWindow == SW_SHOWMINIMIZED ||
+ StartupInfo.wShowWindow == SW_SHOWMINNOACTIVE ||
+ StartupInfo.wShowWindow == SW_MINIMIZE)
+ gtk_window_iconify (GTK_WINDOW (splash->window));
+#endif
+
if (FALSE)
splash->timer = g_timer_new ();
}