Add states and request methods for move and resize.
ClosedPublic

Authored by hein on Apr 17 2016, 2:42 PM.

Details

Summary

Adds states and request methods to determine whether a window can be put into
move or resize modes, and request move and resize modes, respectively.

request* naming pre-discussed with Martin. I chose to add *Mode to be more
explicit as well as avoid namespace conflicts with possible other Move/Resize
methods in the future.

Since these are not toggleable states, there is no requestToggle* methods.

Protocol version is not bumped (also pre-discussed with Martin) since we have
pending changes already bumping to 3.

Depends on D1417.

Test Plan

PlasmaWindowModel test extended.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hein updated this revision to Diff 3386.Apr 17 2016, 2:42 PM
hein retitled this revision from to Add states and request methods for move and resize..
hein updated this object.
hein edited the test plan for this revision. (Show Details)
hein added a reviewer: graesslin.
hein added a subscriber: plasma-devel.
Restricted Application added a project: Plasma. · View Herald TranscriptApr 17 2016, 2:42 PM
graesslin requested changes to this revision.Apr 18 2016, 9:05 AM
graesslin edited edge metadata.
graesslin added inline comments.
src/client/plasmawindowmanagement.h
247–251

why "mode"? Why not just requestMove and requestResize?

src/client/protocols/plasma-window-management.xml
148

since is missing

148–158

same here, why mode?

154

since is missing

src/server/plasmawindowmanagement_interface.cpp
19

close added

src/server/plasmawindowmanagement_interface.h
146–153

why a moveModeRequested and movableRequested?

This revision now requires changes to proceed.Apr 18 2016, 9:05 AM
hein added inline comments.Apr 18 2016, 9:17 AM
src/client/plasmawindowmanagement.h
247–251

Because calling a method for starting an interactive move just "move" is a bit confusing -- but I didn't know Wayland already codified that in the protocol. Will change.

hein updated this revision to Diff 3395.Apr 18 2016, 9:27 AM
hein edited edge metadata.
  • Bring naming closer to upstream protocol; add version info to new methods; cleanup.
graesslin requested changes to this revision.Apr 19 2016, 10:45 AM
graesslin edited edge metadata.
graesslin added inline comments.
src/server/plasmawindowmanagement_interface.cpp
472–477

as said abode: I don't think we need that.

src/server/plasmawindowmanagement_interface.h
146–153

What's the point in movableRequested and resizableRequested? Why would we need them and how should a compositor react to them? If the window is not resizable asking pretty please make it resizable won't help.

I would just scratch those.

This revision now requires changes to proceed.Apr 19 2016, 10:45 AM
graesslin accepted this revision.Apr 19 2016, 10:55 AM
graesslin edited edge metadata.
graesslin added inline comments.
src/server/plasmawindowmanagement_interface.h
146–153

I withdraw that comment - there are also minimizeableRequested and friends. So while they can be considered stupid, it's better to be API wise consistent

This revision is now accepted and ready to land.Apr 19 2016, 10:55 AM
This revision was automatically updated to reflect the committed changes.