This commit allows the user to optionally set the WM_CLASS by setting an environment variable WINEWMCLASS with the aim of allowing him to ensure desktop environments can correctly identify wine windows, unfortunately the executable filename isn't always sufficient as some programs share a common executable name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50095 --- dlls/winex11.drv/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 457173964eb..6b87166c830 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -837,6 +837,7 @@ static void set_initial_wm_hints( Display *display, Window window ) Atom protocols[3]; Atom dndVersion = WINE_XDND_VERSION; XClassHint *class_hints; + char *wine_wm_class;
/* wm protocols */ i = 0; @@ -849,8 +850,9 @@ static void set_initial_wm_hints( Display *display, Window window ) /* class hints */ if ((class_hints = XAllocClassHint())) { + wine_wm_class = getenv( "WINEWMCLASS" ); class_hints->res_name = process_name; - class_hints->res_class = process_name; + class_hints->res_class = wine_wm_class ? wine_wm_class : process_name; XSetClassHint( display, window, class_hints ); XFree( class_hints ); }
Hey guys,
Any chance I could get this merged, it's a really simple patch.
Cheers, Nick
Il lun 21 dic 2020, 00:00 Nicholas Little arealityfarbetween@googlemail.com ha scritto:
This commit allows the user to optionally set the WM_CLASS by setting an environment variable WINEWMCLASS with the aim of allowing him to ensure desktop environments can correctly identify wine windows, unfortunately the executable filename isn't always sufficient as some programs share a common executable name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50095
dlls/winex11.drv/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 457173964eb..6b87166c830 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -837,6 +837,7 @@ static void set_initial_wm_hints( Display *display, Window window ) Atom protocols[3]; Atom dndVersion = WINE_XDND_VERSION; XClassHint *class_hints;
char *wine_wm_class;
/* wm protocols */ i = 0;
@@ -849,8 +850,9 @@ static void set_initial_wm_hints( Display *display, Window window ) /* class hints */ if ((class_hints = XAllocClassHint())) {
wine_wm_class = getenv( "WINEWMCLASS" ); class_hints->res_name = process_name;
class_hints->res_class = process_name;
class_hints->res_class = wine_wm_class ? wine_wm_class :
process_name; XSetClassHint( display, window, class_hints ); XFree( class_hints ); } -- 2.26.2
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91250
Your paranoid android.
=== debiant2 (build log) ===
Task: Patch failed to apply
=== debiant2 (build log) ===
Task: Patch failed to apply