diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index ac8ebd1f8..993988d54 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -23,6 +23,8 @@ #include #include +#include + #include #include @@ -35,6 +37,7 @@ #include "xf_input.h" #include "xf_gfx.h" #include "xf_graphics.h" +#include "xf_utils.h" #include "xf_event.h" @@ -982,7 +985,7 @@ static BOOL xf_event_PropertyNotify(xfContext* xfc, const XPropertyEvent* event, if (status) { /* If the window is in the iconic state */ - if (((UINT32)*prop == 3)) + if (((UINT32)*prop == 3) && !IsGnome()) { minimized = TRUE; if (appWindow) diff --git a/client/X11/xf_utils.c b/client/X11/xf_utils.c index b68a73dc1..7240abbb9 100644 --- a/client/X11/xf_utils.c +++ b/client/X11/xf_utils.c @@ -18,7 +18,9 @@ * limitations under the License. */ +#include #include +#include #include "xf_utils.h" @@ -150,3 +152,9 @@ int LogDynAndXGetWindowProperty_ex(wLog* log, const char* file, const char* fkt, actual_type_return, actual_format_return, nitems_return, bytes_after_return, prop_return); } + +BOOL IsGnome(void) +{ + char* env = getenv("DESKTOP_SESSION"); + return (env != NULL && strcmp(env, "gnome") == 0); +} diff --git a/client/X11/xf_utils.h b/client/X11/xf_utils.h index 40dc2a27a..95d849ebd 100644 --- a/client/X11/xf_utils.h +++ b/client/X11/xf_utils.h @@ -20,6 +20,7 @@ #pragma once #include +#include #include @@ -89,3 +90,5 @@ int LogTagAndXConvertSelection_ex(const char* tag, const char* file, const char* int LogDynAndXConvertSelection_ex(wLog* log, const char* file, const char* fkt, size_t line, Display* display, Atom selection, Atom target, Atom property, Window requestor, Time time); + +BOOL IsGnome(void);