D15175: [effects/cubeslide] Fix several cubeslide issues

Igor Poboiko <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
poboiko added a comment.


  > Hmm, I wonder why the desktop switch OSD is a special window on X11. After inspecting "the osd" with xprop and xwininfo, it looks like it's an ordinary unmanaged window, e.g.
  > 
  >   # xprop's output
  >   ...
  >   _NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
  >   ...
  >   
  >   # xwininfo's output
  >   ...
  >     Override Redirect State: yes
  >   ...
  
  Naive investigation shows that inside `libkwineffects/effectwindow.cpp`, it declares `EffectWindow::isSpecialWindow` (using `WINDOW_HELPER_DEFAULT` macro) to return default value (which is set to be `true`) if corresponding `parent()->property()` is invalid.
  For ordinary windows (i.e. Dolphin), the parent is `KWin::Client`, which is subclass of `KWin::AbstractClient`, which has `isSpecialWindow()` method (and corresponding property), which works fine. 
  For OSD, the parent is `KWin::Unmanaged`, which is subclass of `KWin::Toplevel`, which doesn't have this property - thus it returns default value. Apparently, that means that all unmanaged windows are special.
  
  > On Wayland, it's not special because the OSD doesn't set appropriate type.
  > 
  > Regarding isUtility and acceptsFocus, please delete them. It makes sense to hide/ignore utilities and windows that don't accept focus in the Flip Switch(and Present Windows) effect, but not in this one.
  
  Well, for now `acceptsFocus()` is the only workaround to determine whether a window is an OSD, so in current state we need it. Either that or fixing PlasmaDialog/Wayland interaction (maybe there is some third option that I've missed, though). Unfortunately, I'm not really familiar with the latter...
  
  As for `isUtility()` - well, to be honest I don't even know for sure what is considered to be an utility window, and wm-spec <https://standards.freedesktop.org/wm-spec/wm-spec-latest.html> didn't shed much light on it.
  I just thought it won't hurt if we'll make various weird/non-normal windows sticky (and for that I've borrowed the code, which seemed to be working). I totally rely on you on this matter, however.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D15175

To: poboiko, #kwin, zzag
Cc: davidedmundson, zzag, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.