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'

On Wednesday, September 7, 2016 at 12:31:21 AM UTC+2, Marek 
Marczykowski-Górecki wrote:
>
> -----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----- 
>

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-devel+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-devel@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/aca2d8a6-84e6-4b2a-a805-e567e1e45b94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to