[Rd] Possible x11 window manager window aggregation under one icon?

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Tue Mar 23 14:15:03 CET 2021


On 23 March 2021 at 07:44, Dirk Eddelbuettel wrote:
| On 23 March 2021 at 13:18, Ivan Krylov wrote:
| | Apparently Xfce uses libwnck [*] which groups windows by WM_CLASS in
| | addition to WM_HINTS (as far as understand the code).
| | 
| | Here is what GNOME Shell does [**] besides looking at
| | WM_HINTS.window_group:
| | 
| |  - looks up the window's WM_CLASS in .desktop files known to it
| |  - looks up the window's _NET_WM_PID among running applications (?)
| |  - looks for an XDG startup notification matching the window
| |  - checks other things not likely applicable to R, such as sandbox IDs
| |    and GApplication IDs
| | 
| | Adding StartupWMClass=R_x11 to R.desktop (not part of R sources, but
| | part of the .deb package, I believe) should help GNOME Shell match all
| | x11() windows to a single application without any changes to devX11.c,
| | but I don't have GNOME installed to check it.
| 
| Easy enough for me to check, but I won't get to it for a bit.

Ok, I tried. And amazingly that worked (with a small "but")!

Added the line to the (installed) /usr/share/applications/R.desktop,
asked Gnome Shell to restart (Alt-F2, then r [where r standards for restart,
not littler ;-) ]) and the (existing) two windows (from two distinct 'live'
and long-running plot/monitor sessions) are now regrouped in the 'dock',
which would for the first time be correct behaviour under Gnome (as I
understand it).

Only one small downside: the regrouped icon switches to the old R icon (which
is probably the one we bitmapped).  Would you know how we could force the new
one?

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-devel mailing list