3.2-rc3 KWin in XFCE does not show VM name and color

71 views
Skip to first unread message

Vít Šesták

unread,
Sep 6, 2016, 1:55:54 PM9/6/16
to qubes-devel
Hello,
In 3.0 and 3.1, I used KWin with XFCE and it worked well. In 3.2-rc3, it does not show VM name in the title and does not color borders. Why?
This happens for both Plastik and Breeze.
In pure KDE, it works OK.
Regards,
Vít Šesták 'v6ak'

Marek Marczykowski-Górecki

unread,
Sep 6, 2016, 6:31:21 PM9/6/16
to Vít Šesták, qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Tue, Sep 06, 2016 at 10:55:54AM -0700, Vít Šesták wrote:
> Hello,
> In 3.0 and 3.1, I used KWin with XFCE and it worked well. In 3.2-rc3, it
> does not show VM name in the title and does not color borders. Why?
> This happens for both Plastik and Breeze.
> In pure KDE, it works OK.

In KDE5 custom decorations are done differently than previously -
instead of patching window manager we use its standard functionality
(now available). But this means that windows needs carry some additional
properties and title be prefixed with VM name by GUI daemon, not
decoration plugin. Code responsible for this is here:
https://github.com/QubesOS/qubes-core-admin/blob/master/core-modules/000QubesVm.py#L1785-L1808

It checks if KDE5 is running...

Enabling those settings for other window managers would mean duplicated
VM name prefix at least.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXz0OzAAoJENuP0xzK19csMNoH/iEGKgnSZKDlV4mJx8Bihtym
uoR/LH7VUxeKUJTb86b9SiqzrvQ0imcOL1pNbQQlTkRCBu6+kcUNGvPYl1vf4ji7
egk7zp0R/FhPCzDDyOZADnfzHQNqFV3/eZpst4FMxaaduhEmx1l5jQ1LZusF8oZZ
UnyWegK7s+QVIvL731OsCYceefkiqNiuthPRjP0Yezaw5NpjkwTuuE+KsdhB9H4b
TAXNYSWD7ZboJ6unn3pi+ybsYutMs9OXH5GXdnDRdAhAZ+mGfBveL67HpZgkZEU9
vZdXR6fLefXzRMsCWT3p/jrBXZxwwtBzu5kNu/5zf85rRW0JDTJPzfNNQXGG0lo=
=++J4
-----END PGP SIGNATURE-----

Vít Šesták

unread,
Sep 7, 2016, 1:08:51 AM9/7/16
to qubes-devel, groups-no-private-mail--con...@v6ak.com
Thank you for the link to the code. I actually tried to find something like this, but I was looking at wrong parts of the code.

So the KDE way is used for KDE session, regardless what WM is used. And conversely, if KWin is used with another WM, the non-KDE way is used. It might have been better to use some way to detect WM instead of the session.

If we should stick with xprop -root, there are some other candidates:

$ xprop -root -notype | grep -i kwin
KWIN_RUNNING = 0x1
_ORG_KDE_KWIN_DBUS_SERVICE = "org.kde.KWin"
 $ xprop -root -notype | grep -i kde | xclip
_NET_SUPPORTED = _NET_SUPPORTED, _NET_SUPPORTING_WM_CHECK, _NET_CLIENT_LIST, _NET_CLIENT_LIST_STACKING, _NET_NUMBER_OF_DESKTOPS, _NET_DESKTOP_GEOMETRY, _NET_CURRENT_DESKTOP, _NET_DESKTOP_NAMES, _NET_ACTIVE_WINDOW, _NET_WORKAREA, _NET_DESKTOP_LAYOUT, _NET_CLOSE_WINDOW, _NET_RESTACK_WINDOW, _NET_SHOWING_DESKTOP, _NET_WM_MOVERESIZE, _NET_MOVERESIZE_WINDOW, _NET_WM_NAME, _NET_WM_VISIBLE_NAME, _NET_WM_DESKTOP, _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_DESKTOP, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_MENU, _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_SPLASH, _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_STATE, _NET_WM_STATE_MODAL, _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_SHADED, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _NET_WM_STATE_HIDDEN, _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_ABOVE, _NET_WM_STATE_BELOW, _NET_WM_STATE_DEMANDS_ATTENTION, _NET_WM_STATE_STAYS_ON_TOP, _NET_WM_STRUT, _NET_WM_STRUT_PARTIAL, _NET_WM_ICON_GEOMETRY, _NET_WM_ICON, _NET_WM_PID, _NET_WM_PING, _NET_WM_USER_TIME, _NET_STARTUP_ID, _NET_WM_FULLSCREEN_MONITORS, _NET_WM_ALLOWED_ACTIONS, _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_FRAME_EXTENTS, _KDE_NET_WM_FRAME_STRUT, _KDE_NET_WM_TEMPORARY_RULES, _NET_WM_FULL_PLACEMENT, _KDE_NET_WM_ACTIVITIES, _KDE_NET_WM_SHADOW, _NET_WM_OPAQUE_REGION
_ORG_KDE_KWIN_DBUS_SERVICE = "org.kde.KWin"

The KWIN_RUNNING looks as the most generic one. So, I've tried to use it instead and it works now even with KWin+Xfce:

        if subprocess.check_output(
                ['xprop', '-root', '-notype', 'KWIN_RUNNING']) == \
                'KWIN_RUNNING = 0x1\n':

Do you think you can merge such change back to Qubes?

Regards,
Vít Šesták 'v6ak'

Marek Marczykowski-Górecki

unread,
Sep 7, 2016, 9:43:51 AM9/7/16
to Vít Šesták, qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I'd prefer something that would distinguish KDE4 from KDE5, as the new
method will not work in KDE4. But since KDE4 is no longer available in
dom0, if there is no better way, I'm fine with KWIN_RUNNING.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJX0BmRAAoJENuP0xzK19csA2EH/28IqToJcOi5whpHlCT4J5ha
KtDa1hRvM0Ca1u6hpkFR6flPXKURBH1dmCDVAQZwv58OPNJN3OXWy/YbuNn5Tixp
ME/P0648V+U5yb3X+cGyA7LcyT7EszmtMlAOSYUacPsC/p9TUeniGIaQRr7l6OPn
jMEG2kIc0Sw+tn0ra5HMMLrsI3FWBgrZZ0X3QPanqTLVAh+WT3nMQ7wnd7AjAprb
y5ZydnNxVm4xc61ov157x2owFmXvoJDk5PZhki1MTbjmIJgH5G/zAggCiSxPIDI1
/iIpv4mx5wfK6A/NunIBK1raSHUPLNmb3K3C2YZ0+e8hZx4yK6cjLZY0wfnEcrQ=
=GJmY
-----END PGP SIGNATURE-----

Vít Šesták

unread,
Sep 7, 2016, 5:26:50 PM9/7/16
to qubes-devel, groups-no-private-mail--con...@v6ak.com
Well, you theoretically could call kwin --version and compare version numbers. (This assumes that the kwin used in the one on $PATH.) Or maybe you could try calling the dbus API (assuming that KWin is launched properly within a dbus session). Both looks like overengineering to me, as it is rather designed to work with a specific narrow range of KWin versions.

BTW, advantage of non-checking the KDE version might come with KDE 6, which would also break the condition :)

So, should I make a pull request for this?

Regards,
Vít Šesták 'v6ak'

Marek Marczykowski-Górecki

unread,
Sep 7, 2016, 5:54:25 PM9/7/16
to Vít Šesták, qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Yes, please :)

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJX0IyLAAoJENuP0xzK19cs4S4H/3rh/b0hDKKQzcO3ws+mmEI8
emw4Jw0DQjK9cU1PVlrQSq89DYhccpWlAoLk4X2TYnvF5qZrMUuEmpNIs/D/ZTIM
0vOuWf75XoyJdtB0LMrWrWiA4tsb87tBsOF45LC4afwGYpSyMwG5ny2Oouji+s/0
3WFWmGa3muorviepPUvBBs7yd3a8O2dEBNoTGoVlvDVs9mnSuwue36aPSGgULDfr
Ii/tcwejgvZhzAHuWTIsrHW5orffczi5uG+9yZEP2ezf7fK6kUM2h2fEFE0Npf1m
BtgsoK1PRFmpg/mKqNrUvXaK3PjRTMGFjzg4c/Plq2OMaMrzG2Jv4dt/IHWEYus=
=DhsI
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages