mirror of https://github.com/FreeRDP/FreeRDP
Merge pull request #10409 from MatthewAllDev/master
Fix: Prevent RemoteAPP window minimization on desktop switch in Gnome
This commit is contained in:
commit
5764b8d49e
|
@ -23,6 +23,8 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <winpr/assert.h>
|
||||
|
||||
#include <freerdp/log.h>
|
||||
|
@ -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)
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <winpr/assert.h>
|
||||
#include <winpr/wtypes.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <winpr/wlog.h>
|
||||
#include <winpr/wtypes.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue