After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632229 - ShellWindowTracker: Add LibreOffice to title_patterns
ShellWindowTracker: Add LibreOffice to title_patterns
Status: RESOLVED NOTGNOME
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-15 15:33 UTC by Owen Taylor
Modified: 2010-10-28 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ShellWindowTracker: Add LibreOffice to title_patterns (1.51 KB, patch)
2010-10-15 15:33 UTC, Owen Taylor
none Details | Review
this might do what we want in LibreOffice itself (17.20 KB, patch)
2010-10-22 14:11 UTC, Caolan McNamara
none Details | Review

Description Owen Taylor 2010-10-15 15:33:36 UTC
Since LibreOffice has the same issue as OpenOffice (WM_CLASS is
set to 'LibreOffice 3.3' instead of matching the desktop file name
for the particular application), we need to add it to the
title => application regular-expression list.

https://bugzilla.gnome.org/show_bug.cgi?id=632197
Comment 1 Owen Taylor 2010-10-15 15:33:38 UTC
Created attachment 172438 [details] [review]
ShellWindowTracker: Add LibreOffice to title_patterns
Comment 2 Owen Taylor 2010-10-15 15:35:26 UTC
Caolan: do we have any chance of getting this properly fixed upstream? (see http://live.gnome.org/GnomeShell/ApplicationBased). I seem to remember that we discussed this earlier, but I don't remember the outcome.
Comment 3 Caolan McNamara 2010-10-18 07:48:18 UTC
What you want is that every different type of LibreOffice window has a different WM_CLASS right ?, e.g. "LibreOffice Writer" for word processing windows and "LibreOffice Calc" for spreadsheet windows
Comment 4 Milan Bouchet-Valat 2010-10-18 08:10:35 UTC
Caolan: Yes, you got the idea.
Comment 5 Milan Bouchet-Valat 2010-10-18 08:14:03 UTC
(...and one should never hit enter too quickly.)

Caolan: I should have added that the Shell would need WM_CLASS to match the name of .desktop files that describe each of LibreOffice apps in /usr/share/applications/. This name was "openoffice.org-writer" and friends, so I guess it would be "libreoffice-writer", etc.
Comment 6 Owen Taylor 2010-10-21 19:10:04 UTC
Caolan: ping on this - we need to know whether we should go ahead and make these additions or not. (They are harmless if the problem eventually gets fixed, but if we can get a fix in LibreOffice in the near term would be silly.)
Comment 7 Caolan McNamara 2010-10-22 14:11:52 UTC
Created attachment 173008 [details] [review]
this might do what we want in LibreOffice itself

Well, here's my shot at it. I can't actually test gnome-shell with it because nothing here seems capable of running it (mostly nv-using boxes). But manual inspection of the main windows WM_CLASS looks good.

I imagine, given the gnomeshell patch itself, that it's only the main application windows that matter and not transients and GDK_WINDOW_TYPE_HINT_UTILITY windows etc. right ?
Comment 8 Colin Walters 2010-10-22 14:37:59 UTC
One thing you should consider when patching for this is how you want to behave on Windows 7.  If you want the different Oo.o apps to appear separate, look at:

http://msdn.microsoft.com/en-us/library/dd378459(v=VS.85).aspx

So you might internally call the abstracted function "applicationID" (since this applies to both Windows 7 and GNOME 3), rather than "WMClass".
Comment 9 Colin Walters 2010-10-22 15:13:08 UTC
(In reply to comment #7)
> 
> I imagine, given the gnomeshell patch itself, that it's only the main
> application windows that matter and not transients and
> GDK_WINDOW_TYPE_HINT_UTILITY windows etc. right ?

Transients are fine, we'll follow that.  However free floating UTILITY windows will need to be tagged if they're not transient.
Comment 10 Caolan McNamara 2010-10-28 08:11:02 UTC
Tweaked the patch to toggle the WM_CLASS of utility windows etc, retitled the generic side of it as applicationID and pushed it for LibreOffice 3.3 so will be changed for 3.3.

Modulo my impl being a load of crap this should work in theory in 3.3
Comment 11 Milan Bouchet-Valat 2010-10-28 11:06:00 UTC
Very nice to see that the move to LibreOffice allows this kind of fixes to be pushed! I doubt we could have introduced this change into OpenOffice.org... ;-)
Comment 12 Owen Taylor 2010-10-28 16:10:47 UTC
Cool. I'm just going to WONTFIX my patch then - no need for extra code just to handle a few few weeks of snapshots of LibreOffice.