On Fri, 26 Mar 2021 14:49:56 +0100 Martin Maechler <maech...@stat.math.ethz.ch> wrote:
> I concluded I liked the first [patch] because it would achieve > what's considered "uniformly better" in the sense that it makes > R graphics behave like "all other" desktop applications *and* it > would do so for all possible window manager scheme without any > need of some desktop setting (which a typical user would not > know about, nor know that s?he should/could change). Martin, here is some information on how X11 (and rgl) windows are grouped on different platforms, depending on the presence of the first patch and the .desktop file: - GNOME [1] needs a .desktop file to group windows by their WM_CLASS and otherwise groups windows by their WM_HINTS.window_group only, which makes different configurations possible: * no window_group, no .desktop file: no grouping * window_group patch, no .desktop file: plot windows grouped per-process, x11 and rgl separately * StartupWMClass in .desktop file: x11 and rgl windows from all R processes grouped together - the XQuartz window manager apparently uses WM_HINTS.window_group but not WM_CLASS to group windows [2] (patch is only relevant for rgl, .desktop files aren't relevant) - Xfce groups windows by WM_CLASS [3], so adding WM_HINTS.window_group or changing the .desktop file doesn't group them any more - KDE seems to follow the .desktop file (if StartupWMClass is present) and group by WM_CLASS otherwise [4], but I don't have it installed to check. On the other hand, KDE might be ignoring WM_HINTS.window_group, judging by the absence of "WM2GroupLeader" in the source code of Plasma Workspace. This implies no changes in window grouping from patching window_group or changing the .desktop file. [5] To summarise, the patch to x11() leads to visible window grouping in GNOME-based environments. My impression is that most environments group windows by WM_CLASS (which had been happening without the patch), but there are far too many window managers to check that impression. -- Best regards, Ivan [1] Including Cinammon: https://github.com/linuxmint/cinnamon/blob/72732da43e971b83d926af56998c83ee8d000394/src/cinnamon-window-tracker.c#L482 Likely Unity forks too. [2] Judging by https://stat.ethz.ch/pipermail/r-devel/2021-March/080571.html [3] With minor inconsistencies regarding x11 vs rgl windows between Win+Tab "switch between application windows" and the window buttons on the task bar, but let's not focus on that. [4] https://invent.kde.org/plasma/plasma-workspace/-/blob/7c49a0ae/libtaskmanager/xwindowtasksmodel.cpp#L439 [5] Strictly speaking, StartupWMClass= in the .desktop file lets the desktop environment associate the plot windows with the R launcher button if it's also present on the task bar. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel