GNOME Bugzilla – Bug 632229
ShellWindowTracker: Add LibreOffice to title_patterns
Last modified: 2010-10-28 16:10:47 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
Created attachment 172438 [details] [review] ShellWindowTracker: Add LibreOffice to title_patterns
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.
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
Caolan: Yes, you got the idea.
(...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.
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.)
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 ?
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".
(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.
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
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... ;-)
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.