Set specific edge cursor shape when resizing
ClosedPublic

Authored by davidedmundson on Jun 7 2018, 12:35 AM.

Details

Summary

Instead of seeing the cursor <--> on the left edge you now see an icon
that looks like |<- .

This brings kwin decorations in line with GTK CSD icons.

In theory this is also useful to tell which window will resize in the
case of side-by-side windows (regardless of whether borders are on or
not). In practice with the adwaita icon theme I tested with it's not
very intuitive to realise which is which till you learn the icon.

Change is more involved than it should be as Qt::CursorShape doesn't
have these entries, and I don't want to shadow that enum internally or have
to change kwin effect code.

Specifics depend on cursor icon theme if they are not present it will
fallback to the <--> icon. (Breeze does not have them currently)

Test Plan

Resized some windows (on X)
Correct icon appeared

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.
davidedmundson created this revision.Jun 7 2018, 12:35 AM
Restricted Application added a project: KWin. · View Herald TranscriptJun 7 2018, 12:35 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Jun 7 2018, 12:35 AM
romangg added a subscriber: romangg.Jun 7 2018, 1:28 AM
romangg added inline comments.
abstract_client.h
1126

Left is a class, right is an enum. How does this work? Uses an implicitly declared move operator? Does this then really do what you want it to do (i.e. write Qt::ArrowCursor to CursorShape::m_shape.

graesslin accepted this revision.Jun 7 2018, 4:24 AM
graesslin added a subscriber: graesslin.
graesslin added inline comments.
abstract_client.h
1126

It's just implicit conversion. A neat implementation.

This revision is now accepted and ready to land.Jun 7 2018, 4:24 AM
This revision was automatically updated to reflect the committed changes.