14225 Commits (bf932c4e9719ec9498f56a70099cbd62c0b955e8)
 

Author SHA1 Message Date
Martin Gräßlin bf932c4e97 Fix crash when accessing ShellClient::iconGeometry for a not mapped window
It uses windowManagementInterface which is null until the window
is mapped. A not mapped window obviously has an invalid iconGeometry.
9 years ago
Martin Gräßlin 0b9e6a4aa2 Fix start move through drag distance on window decoration
We need to call handleMoveResize on the mouse move with button down.

Auto tests adjusted to include all possible directions.
9 years ago
Martin Gräßlin 7777f0c507 Invalidate double click timer when start move resize
A press, move, release, press cycle should not trigger the double
click action.
9 years ago
Martin Gräßlin 68683873e3 [plugins/qpa] Fix build with Qt 5.4
PlatformIntegration::destroyScreen got added in 5.5.
9 years ago
Martin Gräßlin 51ee514227 [plugins/qpa] Add a dummy screen on startup
Qt has problems initializing everything correctly if there is no screen
at startup. E.g. the breeze widget style tries to initialize some pixmaps
and this fails. In worst case hitting asserts in Qt (debug build).

This change creates a dummy screen which gets destroyed as soon as there
is a real screen.

Reviewed-By: notmart and sebas
9 years ago
l10n daemon script 544e5a7fb8 SVN_SILENT made messages (.desktop file) 9 years ago
Martin Gräßlin abca474d44 Don't pass keyboard events to internal windows outside the screen geometry
PresentWindows moves the close button outside the visible area. We
don't want that one to take all key events.
9 years ago
Martin Gräßlin 7d08b08470 [plugins/qpa] Adjust to changes in Qt 5.7 QPA interface
BUG: 360269
9 years ago
l10n daemon script 9fb71ef9a2 SVN_SILENT made messages (.desktop file) 9 years ago
l10n daemon script b6907427d0 SVN_SILENT made messages (.desktop file) 9 years ago
Martin Gräßlin 34951b3bee Fix repaints area on Wayland damage
The damage event of the Surface does not consider the offset through
the server side decoration. Due to that we need to have a different
repaint and damage area. As Toplevel::addDamage(QRegion) is only used
in the Wayland case the repaint adjustment is removed from the generic
implementation and moved into the specific implementations. While it
wouldn't hurt to have the repaint adjustment in Toplevel, it would
trigger a repaint of an unchanged area.

For Client I'm not sure whether it's correct without considering the
clientPos. My testing shows it's working, but that might also just be
do to Xwayland using OpenGL buffers. Needs further testing.
9 years ago
Martin Gräßlin 2c0df531b7 Only pass key press events to TabBox
We want TabBox to operate on key press, not on key release. So far
it only operated on release as the press was filtered out by the
global shortcuts filter. To prevent that the tab box filter is moved
before the global shortcuts filter.

Note: first usage of TabBox has current window selected instead of
next. This problem is also visible on X11.
9 years ago
Martin Gräßlin d2716c834b Pass pointer and wheel events to TabBox from special event filter
The TabBox implements methods for those events and performs same
logic as on X11. Click outside of TabBox closes. If the event is on
the TabBox we don't filter the event out and let the internal filter
forward the event.
9 years ago
Martin Gräßlin 6c0ed26c65 Add bool checkInputWindowEvent(QWheelEvent *e) to EffectsHandlerImpl
Allows to also pass through some QWheelEvents.
9 years ago
Martin Gräßlin 7718b6dce3 [effects] Don't assume windowInputMouseEvents only carries QMouseEvents
A QEvent* is passed around, this could also be a QWheelEvent. Only
present windows static casted, all other effects verified.

Documentation is not existing, so we don't know what was intended.
9 years ago
l10n daemon script 5cfadf72a1 SVN_SILENT made messages (.desktop file) 9 years ago
Martin Gräßlin aea4221575 [tabbox] Pass the tabbox window to elevate as a QWindow instead of winId
By using QWindow we can also find the TabBox window on Wayland where
the winId is not really helpful.

This also changes the elevation from Unamanged to Toplevel, so that
it is no longer X11 specific.

Result: TabBox stays on top of all windows also on Wayland.
9 years ago
Martin Gräßlin 59e3b96812 Add a Toplevel *Workspace::findInternal(QWindow *w) const
This method is able to match a QWindow created by KWin to a Toplevel.
On X11 by matching winId against Unmanaged, on Wayland by matching
to internal window of ShellClient.

Finding the internal window is a commonly needed feature to e.g.
elevate the TabBox window.
9 years ago
Martin Gräßlin 9c78d28327 Fix Workspace::hasClient(const AbstractClient *c)
Properly find AbstractClient. This makes TabBox activate Wayland clients
on end.
9 years ago
Martin Gräßlin c8b3f71cc6 Fix typo 9 years ago
Martin Gräßlin 2787fdb873 [autotest] Fix build on build.kde.org (Try 3)
Qt::Orientation seems not to be a declared metatype with Qt 5.4.
9 years ago
Martin Gräßlin db76d4279a Fix build of stable branch on build.kde.org (Try 2)
Like cc64bb25ae just for xkb.
9 years ago
Martin Gräßlin 04fdecdd59 Implement sanity checks when placing transients
A transient window should always be visible on the current screen.
This change ensures that a transient is always placed in a way that
the transient window is visible on the screen ignoring the transient
offset hint if it has to be.

Unfortunately QtWayland doesn't set the transient hint correctly:
a sub menu is a transient to the main window and not to the parent
menu resulting in quite off positioned menus, see:
https://bugreports.qt.io/browse/QTBUG-51640
9 years ago
Martin Gräßlin fa774230f3 Fix transient placement for decorated parents
Need to add client pos to the transient's position. The offset is
relative to the parent surface, but the client doesn't know about the
size of the decoration, thus KWin needs to add it.
9 years ago
Martin Gräßlin f2873dcd36 [autotest] Add test for transient placement positioning
Test creates windows and transients for it and verifies the position.
For decorated windows the position is currently broken as it does not
consider the adjusted client position.
9 years ago
l10n daemon script d678ffc8c5 SVN_SILENT made messages (.desktop file) 9 years ago
Martin Gräßlin cc64bb25ae Fix build of stable branch on build.kde.org
CI system doesn't have Qt 5.5 yet, let's not break because of
qCInfo.
9 years ago
Jonathan Riddell 72dbdaad06 Update version number for 5.5.95
GIT_SILENT
9 years ago
Martin Gräßlin 8a1f19b145 Add support for Drag'n'Drop on Wayland
Drag'n'Drop on Wayland allows us to improve the drag'n'drop experience.
When entering a window during the drag'n'drop operation, KWin raises it.

BUG: 36065
FIXED-IN: 5.6.0 (Wayland only)
9 years ago
l10n daemon script 9472756205 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
9 years ago
Thomas Lübking 9d09cf6dc9 respect motif and rules on unmaximizing
when restoring a borderless maximized, the window shall
not suddenly be decorated

BUG: 359797
FIXED-IN: 5.6
REVIEW: 127198
9 years ago
Thomas Lübking 0e80a16db5 restrict cross-vd activation to in-client distrib
QDialog or at least QMessageBox does this and I doubt Lubos' idea was to
"allow focus stealing if the client nags enough" - switching the VD is a
major interrupt and prevented when a new window shows up.
It should not be possible to stomp on ground and then receive
focus - notably not on the other desktop.

I assume the original idea was to let clients distribute focus *inside*
across virtual desktops, maybe also permit when no client was active,
but hardly otherwise.

BUG: 359683
FIXED-IN: 5.6
REVIEW: 127153
9 years ago
l10n daemon script 25b6938804 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
9 years ago
Marco Martin a104a4af7f try more aggressively to retarget
instead of deleting all animations when one is over,
try to retarget them all, and redo them only
if retargeting fails

REVIEW:127101
9 years ago
Martin Gräßlin 6ae4775651 Fix fallback resolution in WaylandCursorTheme
If we find an cursor we shouldn't return null.
9 years ago
Martin Gräßlin 166d282a9f [autotests] Specify XCUROSR_THEME and XCURSOR_SIZE in pointer input test
Try to fix test on CI system. With neither a config nor the env variables
the cursor selection falls back to the default cursor theme, which might
not contain the cursors we need.
9 years ago
Marco Martin f7feca678d respect WindowForceBlurRole or forcecontrast
even if scaled or translated, if WindowForceBlurRole is set
do the blur anyways

same thing for backgroundcontrast

reviewed by: Martin Gräßlin <mgraesslin@kde.org>
9 years ago
Martin Gräßlin ed7bf6e091 Send leave/enter pointer event when starting/stoping effect mouse interception
When starting effect mouse interception the current focused window
and or decoration should get a leave event. Similar when the effect mouse
interception ends the current pointer position needs to be evaluated and
a pointer enter be sent if needed.
9 years ago
Martin Gräßlin 6d495f1dc9 [autotests] New test case to verify cursor changes correctly in effects
The test case verifies that setting an override cursor during mouse
interception works and that it's also possible to change it. When
ending mouse interception the cursor image should be adjusted again.

The test shows that when mouse interception starts KWin should send
a pointer leave event to the current focused window and similar needs
to handle the stop of mouse interception.
9 years ago
Martin Gräßlin b6677ca04e Reset stored window before setting it as focused pointer surface on seat
Updating the focused pointer surface results in the cursor to change.
The CursorImage needs the current focused window to evaluate which cursor
to use, though. Thus we need to make sure that the window reflects the
current state before updating the seat.
9 years ago
Martin Gräßlin d15e94f326 [autotest] Add test case for cursor image
This test case verifies that the cursor image and hot spot changes
correctly when focusing a window, changes when damaged and hides.

Test shows that when focusing a window the cursor image is not
removed, neither that unfocus sets back to fallback cursor properly.
9 years ago
Martin Gräßlin 873e2b0320 Add support for Move/Resize cursor mode 9 years ago
Martin Gräßlin 2292e87b35 Clear cursor cache on theme changes
The WaylandCursorTheme emits a signal whenever it reloads the theme.
This is used by CursorImage to clear the cache and reload decoration
and fallback cursor.
9 years ago
Martin Gräßlin a029300ce5 Rework cursor image handling for Wayland
So far updating the cursor image was not really defined. It was possible
to use the cursor image from the wayland seat or have a custom set cursor
image. But there are no rules in place to decide which one to use when.

With this change a dedicated CursorImage class is introduced which tracks
the cursor image changes on the seat, on the decoration, in the effects
and so on. In addition it tracks which is the current source for the
image, that is whether e.g. the cursor from the seat or from effects
override should be used. Whenever the cursor image changes a signal is
emitted, which is connected to the signal in AbstractBackend.

Based on that the backends can directly show the image. The existing
code in the backends to install a cursor shape or to install the cursor
from the server is completely dropped. For the backend it's irrelevant
from where the image comes from.

A new feature added is that the cursor image is marked as rendered. This
is then passed on to the frame rendered in the Surface and thus animated
cursors are finally working. Unfortunately animated cursors are broken in
Qt (see https://bugreports.qt.io/browse/QTBUG-48181 ).
9 years ago
Martin Gräßlin 5acf9abda8 Merge branch 'Plasma/5.5' 9 years ago
Martin Gräßlin 3434358acd [aurorae] Handle client palette changes
When the client's palette changes we need to update the internal colors
and emit a colorChanged, so that the decoration can repaint.

BUG: 357311
FIXED-IN: 5.5.5
REVIEW: 126891
9 years ago
l10n daemon script 5e564cdf7f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
9 years ago
David Rosca a982367a75 Morphingpopups: Don't skip small steps
Resize may happen in smaller steps, so we should not skip them.

REVIEW: 127137
9 years ago
Martin Gräßlin 5b945d2b1c Try alternative cursor names in WaylandCursorTheme::get
If resolving a cursor fails, let's also try the alternative cursor
names.
9 years ago
Martin Gräßlin 72a25aa9ff Add Cursor::cursorAlternativeNames
Make the internal hash of cursor names available.
9 years ago