Acknowledge the server side deco mode in WaylandServer not ShellClient
ClosedPublic

Authored by graesslin on Jan 18 2018, 8:22 PM.

Details

Summary

With GTK applications our code showed issues. With GTK the sequence for
a menu or dialog window is:

  1. create surface
  2. create server side decoration
  3. request csd
  4. create xdg_shell_surface

Which result in KWin to have the ServerSideDecoration object being
created before the ShellClient is created. The connect for mode changed
happens in ShellClient, which is too late to catch that the window
requested client side decoration. Thus KWin created a decoration about
things such as a menu.

This change moves the acknowledge of the mode to WaylandServer. As we
anyway always acknowledge the requested mode we can also do it there and
don't require ShellClient to be present. Thus when the ShellClient is
created the mode is properly reflected and no decoration is created.

BUG: 389117
FIXED-IN: 5.12.0

Test Plan

Played a lot with evince

Diff Detail

Repository
R108 KWin
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.Jan 18 2018, 8:22 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 18 2018, 8:22 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
graesslin requested review of this revision.Jan 18 2018, 8:22 PM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptJan 18 2018, 8:22 PM
davidedmundson accepted this revision.Jan 19 2018, 12:21 PM
This revision is now accepted and ready to land.Jan 19 2018, 12:21 PM
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptJan 19 2018, 12:21 PM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptJan 19 2018, 3:33 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptJan 23 2018, 3:59 PM