Commit Graph

17 Commits (7e8facc3fde853a93683554e5fc9bfd4985e4760)

Author SHA1 Message Date
Martin Flöser c44adda40f Hide decoration tooltip when the decoration gets destroyed
Summary:
BUG: 394977
FIXED-IN: 5.13.1

Test Plan: Manual testing

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13299
2018-06-10 09:18:51 +02:00
Алексей Шилин 5a14b6a6a2 Improve tooltips behavior
Summary:
Window buttons tooltips used to appear on hover immediately. As
the result, they mostly appeared when not needed e.g. when user
was closing a window, or when the mouse pointer slightly touched
a button while being moved elsewhere.

This commit changes the tooltips behavior to WakeUp-FallAsleep
approach used by Widgets.

BUG: 392765
FIXED-IN: 5.13

Reviewers: #kwin, graesslin, broulik, #plasma

Reviewed By: #kwin, graesslin, #plasma

Subscribers: zzag, broulik, kwin, hein

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12404
2018-04-22 23:44:39 +03:00
Martin Flöser 04d8434a09 KWin: tooltips
Summary:
BUG: 383040

KDecoration part of the patch:
https://phabricator.kde.org/D7246

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: cfeck, graesslin, luebking, broulik, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9294
2018-01-18 19:59:17 +01:00
Kai Uwe Broulik 93938d60b8 Restore global menu support
This brings back global menu support in KWin.
The DBusMenu infrastructure is different that we just read the DBus service name and
menu object path from the windows rather than passing around window IDs on DBus which
won't work on Wayland.

Differential Revision: https://phabricator.kde.org/D3089
2017-01-11 10:21:03 +01:00
Martin Gräßlin eed4bf32ae Cache the clientSize in DecoratedClientImpl
Summary:
So far whenever the window geometry changed the widthChanged and
heightChanged signals were emitted even if they did not change.
E.g. while moving a window this resulted in the signal being emitted
after every step, although from decoration point of view nothing
changed.

The decoration performed costly tasks like re-layout the window buttons.

With this change the client size is cached and the widthChanged signal
is only emitted if the width actually changed. Same for heightChanged.

This results in the decoration only re-layouting the buttons if the
window is resized horizontally. All other geometry changes no longer
result in a re-layout.

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2389
2016-08-10 14:22:19 +02:00
Martin Gräßlin 00fe5ec401 [decorations] Don't recreate Renderer once the Compositor is destroyed
If we get a compositingToggled because the Compositor is going down we
don't need to recreate the Renderer as KWin as a whole is going down.

Thus we disconnect the compositingToggled connection when the Compositor
is about to be destroyed.
2016-05-23 09:28:27 +02:00
Martin Gräßlin 6cd0d5a54a Delay maximize button click to next event cycle
Summary:
The delay to next cycle dance is needed for Aurorae. Maximizing a
window can result in the decoration being destroyed, in which case
QtQuick can trigger a crash.

A test case is added to simulate the situation and ensure that maximize
still works also after the change.

BUG: 362772
FIXED-IN: 5.6.5

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1586
2016-05-11 13:45:14 +02:00
Thomas Lübking 1c344c16d9 emit shadeChanged before calculating unshaded size
Otherwise the old (shaded) border sizes will be invoked, causing
a shrinkage of the window

BUG: 357669
FIXED-IN: 5.6
REVIEW: 126671
2016-01-18 22:50:13 +01:00
Martin Gräßlin 6270ea35a2 DecoratedClientImpl switches from operating on Client to AbstractClient 2015-12-18 16:41:49 +01:00
Martin Gräßlin 1758db337f DecoratedClientImpl::client returns AbstractClient* instead of Client* 2015-12-18 16:41:49 +01:00
Mika Allan Rauhala 3389c7569f Adapt to KDecoration API changes
Adapt to API changes introduced by b62e8888cd39301e00ad98dfe791fa66676408fb.
It adds DecoratedClient::color(group, role) for getting colors that are
not included in QPalette. Breeze used to read these colors from
kdeglobals, breaking per window color schemes. KWin now handles reading
these colors along with QPalette loading with DecorationPalette.

REVIEW: 122883
2015-03-31 15:26:55 +02:00
Martin Gräßlin faa78e187e Rename DecoratedClient::borderingScreenEdges to adjacentScreenEdges 2014-11-11 14:33:31 +01:00
Martin Gräßlin 2fdafbb133 s/requestMaximize/requestToggleMaximization/g 2014-11-11 09:53:54 +01:00
Martin Gräßlin 447fed7e37 Adjust DecoratedClientImpl to changes in DecoratedClientPrivate 2014-10-23 10:56:43 +02:00
Martin Gräßlin a903fb2c64 Implement borderingScreenEdges for the DecoratedClientImpl
Uses the QuickTileMode of the Client to indicate which borders to
remove. This could be extended to be in general when a window borders
the screen edge and not just for quick tile mode.
2014-07-25 14:02:27 +02:00
Martin Gräßlin c8c0bace31 Destroy DecorationRenderer in setup/finish compositing
So far the DecorationRenderer got destroyed and recreated after
the signal compositing toggled was emitted. But that's too late for
e.g. the OpenGL Textures to be destroyed. So lets trigger the destroy
directly in setup/finish compositing. The new renderer will still be
created after the compositing toggled is emitted - we don't want to
have it recreated for the still active compositer type.
2014-07-25 14:02:27 +02:00
Martin Gräßlin 0030eb7f84 Initial import of support for new KDecoration2 based decorations
NOTE: this is not working completely yet, lots of code is still ifdefed
other parts are still broken.

The main difference for the new decoration API is that it is neither
QWidget nor QWindow based. It's just a QObject which processes input
events and has a paint method to render the decoration. This means all
the workarounds for the QWidget interception are removed. Also the paint
redirector is removed. Instead each compositor has now its own renderer
which can be optimized for the specific case. E.g. the OpenGL compositor
renders to a scratch image which gets copied into the combined texture,
the XRender compositor copies into the XPixmaps.

Input events are also changed. The events are composed into QMouseEvents
and passed through the decoration, which might accept them. If they are
not accpted we assume that it's a press on the decoration area allowing
us to resize/move the window. Input events are not completely working
yet, e.g. wheel events are not yet processed and double click on deco
is not yet working.

Overall KDecoration2 is way more stateful and KWin core needs more
adjustments for it. E.g. borders are allowed to be disabled at any time.
2014-07-25 14:02:26 +02:00