Rework ShellClient fullscreen control
ClosedPublic

Authored by romangg on Jan 9 2019, 8:08 PM.

Details

Summary

The ShellClient::setFullScreen method was a direct copy of the Client
version.

Straighten out the function logic now and align with modern coding style.

In short we check:

  1. what the manual override window rule wants,
  2. if there is a change at all with this,
  3. if such a change is possible.

And do:

  1. (un-)set the fullscreen,
  2. emit the changed signal.
Test Plan

Manually, autotests pass.

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.
romangg created this revision.Jan 9 2019, 8:08 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 9 2019, 8:08 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Jan 9 2019, 8:08 PM
zzag added a subscriber: zzag.Jan 9 2019, 8:28 PM

Please capitalize "screen" in "fullscreen".

shell_client.h
88–90 ↗(On Diff #49102)

Unrelated change.

In D18132#390113, @zzag wrote:

Please capitalize "screen" in "fullscreen".

I'm thinking about going the other way. Changing every occurrence of FullScreen to Fullscreen. Wikipedia, the Wayland docs and xdg-shell stable all write the word together. So camel case S is not in order.

zzag added a comment.Jan 10 2019, 12:33 PM

I'm thinking about going the other way. Changing every occurrence of FullScreen to Fullscreen. Wikipedia, the Wayland docs and xdg-shell stable all write the word together. So camel case S is not in order.

Argh, consistency will be messed up. Currently, capitalized "screen" is more popular in KWin, though in KWayland "screen" has lowercase.

zzag added a comment.EditedFeb 8 2019, 2:34 PM

Given that we'd like to update the fullscreen state same way as the maximize state, I think we can live with the current control flow in ShellClient:;setFullScreen (for now).

romangg updated this revision to Diff 59804.Jun 14 2019, 4:56 PM
romangg marked an inline comment as done.
  • Rebase on master
  • Remove function definition in header

Merging now to not stall for too long the series without good reason.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 8 2019, 10:44 AM
This revision was automatically updated to reflect the committed changes.