[xcb] Fix implementation of _NET_WM_FULLSCREEN_MONITORS
ClosedPublic

Authored by graesslin on Mar 17 2018, 5:16 PM.

Details

Summary

According to NETWM spec the client "wishing to change this list MUST send
a _NET_WM_FULLSCREEN_MONITORS client message to the root window". This
was not implemented at all, instead the property was updated. The
property must be set by the window manager, or as the spec says:
"The Window Manager MUST keep this list updated to reflect the current
state of the window."

In KWin (as the user of NETWinInfo) this was implemented correctly (see
kwin, file netinfo.cpp method WinInfo::changeFullscreenMonitors).

BUG: 391960

Test Plan

New test case added which verifies the client/wm interplay,
old and incorrect test case removed

Diff Detail

Repository
R278 KWindowSystem
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Mar 17 2018, 5:16 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 17 2018, 5:16 PM
graesslin requested review of this revision.Mar 17 2018, 5:16 PM
davidedmundson accepted this revision.Mar 21 2018, 12:48 AM
This revision is now accepted and ready to land.Mar 21 2018, 12:48 AM
This revision was automatically updated to reflect the committed changes.
kossebau added inline comments.
src/platforms/xcb/netwm.cpp
2845–2847

Seems clang (at least as of FreeBSD with -Wc++11-narrowing) does not like this narrowing from the int topology properties to the uint32_t array one:

00:37:23 /usr/home/jenkins/workspace/Dependency Build Frameworks kf5-qt5 FreeBSDQt5.9/kwindowsystem/src/platforms/xcb/netwm.cpp:2846:13: error: non-constant-expression cannot be narrowed from type 'int' to 'uint32_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
00:37:23             topology.top, topology.bottom, topology.left, topology.right, 1
00:37:23             ^~~~~~~~~~~~

https://build.kde.org/view/CI%20Management/job/Dependency%20Build%20Frameworks%20kf5-qt5%20FreeBSDQt5.9/25/console

Should this be fixed with some casting?

graesslin added inline comments.Mar 24 2018, 7:41 AM
src/platforms/xcb/netwm.cpp
2845–2847

I guess we need to fix this

kossebau added inline comments.Mar 24 2018, 10:07 PM
src/platforms/xcb/netwm.cpp
2845–2847

Thanks for having done that :)