Use Windows OS client (Window XP, Windows 7 and later), windows opened via xpra will combine all of them to a button "Xpra : screen for X " instead of separating related windows.
Original ML post: Combine window from taskbar.
MSDN link: Application User Model IDs (AppUserModelIDs)
In particular: A single executable file with a UI with multiple modes that appear to the user as separate applications should assign different AppUserModelIDs to each mode. For instance, a portion of an application that users see as an independent experience that they can pin to and launch from the taskbar separately from the rest of the application should have its own AppUserModelID, separate from the main experience."
It looks like we need to call SHGetPropertyStoreForWindow and add the AppUserModelIDs
we want on each window.
I think this is the pywin32 part solved (looks easy, but took hours to figure out) - Windows 7 onwards only:
from win32com.propsys import propsys ps = propsys.SHGetPropertyStoreForWindow(hwnd) key = propsys.PSGetPropertyKeyFromName("System.AppUserModel.ID") value = propsys.PROPVARIANTType("hello") ps.SetValue(key, value)
work in progress patch
It's done as of r8601.
You can find a beta win32 client with this change.
Please let us know if that works for you. This is not suitable for a v0.14.x backport.
I've just noticed one small problem: the window icon does not seem to be set properly if I open a secondary window with Firefox, it shows the default GTK icon instead. So please re-assign to me after testing.
Please let us know if that works for you. This is not suitable for a v0.14.x backport.
I've just tested with Windows XP and Windows 7 client. And:
I've just noticed one small problem: the window icon does not seem to be set properly if I open a secondary window with Firefox, it shows the default GTK icon instead. So please re-assign to me after testing.
With windows 7: I opened 3 Firefox's windows, and all of them show the default Firefox icon, not default GTK icon.
Windows XP: not work for me.
It is not meant to work with XP. The API does not exist in versions older than Windows 7.
To get a different grouping with XP, you would need a separate xpra client process, and therefore a different server session. This cannot be fixed from within xpra.
Chrome, Opera and xterm are still group together.
Fixed in r8603 - new beta uploaded, this one is actually a different, long standing bug which will be backported.
(side note: that's my luck: all the apps I tested, like Firefox, worked as they set the group leader property, Chrome and Opera do not..)
Chrome, Opera and xterm are still group together.
Fixed in r8603 - new beta uploaded, this one is actually a different, long standing bug which will be backported.
Just test again. Chrome, Opera and xterm are ungroup now. xterm's windows are separate to many group only.
(side note: that's my luck: all the apps I tested, like Firefox, worked as they set the group leader property, Chrome and Opera do not..)
I think so, too. So I tested all of them.
xterm's windows are separate to many group only.
each xterm gets its own group because we use the process pid to decide if windows belong in the same group when the application doesn't specify a group leader.
I guess we could use the command and/or window class to group things differently, but this could cause more bugs and what we have works well enough I think. So I am closing this ticket.
So I tested all of them.
Thank you very much!
each xterm gets its own group because we use the process pid to decide if windows belong in the same group when the application doesn't specify a group leader. I guess we could use the command and/or window class to group things differently, but this could cause more bugs and what we have works well enough I think. So I am closing this ticket.
Yeah, I don't use xterm in my case. Thank you very much for your quick reply and fix !! :)
Whilst backporting some of those changes to v0.14.x, I found more problems with it (including one bug which could lead to a hidden window+memory leak), so there are more fixes for this in r8628 + r8629, r8630, logging tweaks in r8632.
Since I was there, I also changed it so we now group by window class in trunk (done in r8626 - but this won't be the case in v0.14.x where we will continue to prefer the pid if present): so now xterms get grouped together.
Backport of most of this to v0.14.x is in r8631. Beta build of both 0.14 and trunk are in the beta area (note: 0.14.x will not be getting the grouping code for MS Windows - so it is only there to verify that things aren't broken elsewhere by these changes)
Unconfirmed reports of problems with SHGetPropertyStoreForWindow
in ticket:756#comment:5.
@afarr: please re-open this ticket if needed.
With -d win32
, you should be seeing something like:
win32 hooks: propsys=<module 'win32com.propsys.propsys' from 'C:\Program Files (x86)\Xpra\win32com.propsys.propsys.pyd'> hooked group leader override using <module 'win32com.propsys.propsys' from 'C:\Program Files (x86)\Xpra\win32com.propsys.propsys.pyd'>
Using 0.15.0 r8689 windows client (windows 8.1) against 0.15.0 r8661 fedora 20 client, with -d win32
I am seeing no sign of the SHGetPropertyStoreForWindow
errors mentioned in #756.
It must've been the older client. Leaving closed.
Minor warning fixed in r8694:
C:\Program Files\Xpra\library.zip\xpra\client\gtk2\client.py:399: GtkWarning: gdk_window_set_group not implemented
I may have spoken too soon... testing (other things) with win32 client 0.15.0 r8743 against fedora 20 server 0.15.0 r8743 ...
Whenever I open a new application from a start-child xterm (firefox, gedit, transparent_colors.py, test_workspace.py, etc.) I get that error message again: 2015-03-03 17:26:17,224 failed to set group leader: 'module' object has no attribute 'SHGetPropertyStoreForWindow'
.
I guess I'll open this ticket back up.
Whoops... testing again with your 0.15.0 r8743 win32 build ... no sign of that error message.
Handing this off to you Smo.
Tried installing http://sourceforge.net/projects/pywin32/ again into my build system.
I seem to be able to do
from win32com import propsys
in python so I will try to build again and
test.
Odd I had this installed before so i'm not sure why this is an issue.
This seems to have solved the issue not sure why but the message is now gone.
The window group code has been re-implemented in C++ (see r14795) so we can move away from pywin32 and use a newer build system (see #678).
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/799