Commit graph

14421 commits

Author SHA1 Message Date
Marco Martin
595c5937c9 use a global static for animation ids
using stack adresses makes it possible (even tough not frequent)
for two animations (onle just killed, one just created) to have
the same id, causing scripts to be potentially really confused.
this replaces the id with a global counter, and the
"flying tooltips" bug is gone.

REVIEW:127276
BUG:360068
CCBUG:352254
2016-03-04 18:19:40 +01:00
Martin Gräßlin
0532e8c9ac Merge branch 'Plasma/5.6' 2016-03-04 16:38:39 +01:00
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.
2016-03-04 16:33:09 +01:00
Martin Gräßlin
c6f3fccdab Merge branch 'Plasma/5.6' 2016-03-04 15:46:56 +01:00
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.
2016-03-04 15:40:20 +01:00
Martin Gräßlin
eb7f755492 Merge branch 'Plasma/5.6' 2016-03-04 14:26:41 +01:00
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.
2016-03-04 14:18:32 +01:00
Martin Gräßlin
6c0ed26c65 Add bool checkInputWindowEvent(QWheelEvent *e) to EffectsHandlerImpl
Allows to also pass through some QWheelEvents.
2016-03-04 14:18:32 +01:00
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.
2016-03-04 14:18:32 +01:00
l10n daemon script
5cfadf72a1 SVN_SILENT made messages (.desktop file) 2016-03-04 12:10:05 +00:00
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.
2016-03-04 09:44:24 +01:00
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.
2016-03-04 09:42:33 +01:00
Martin Gräßlin
9c78d28327 Fix Workspace::hasClient(const AbstractClient *c)
Properly find AbstractClient. This makes TabBox activate Wayland clients
on end.
2016-03-04 08:37:56 +01:00
Martin Gräßlin
c8b3f71cc6 Fix typo 2016-03-03 17:01:52 +01:00
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.
2016-03-03 16:26:55 +01:00
Martin Gräßlin
db76d4279a Fix build of stable branch on build.kde.org (Try 2)
Like cc64bb25ae just for xkb.
2016-03-03 16:14:17 +01:00
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
2016-03-03 15:57:55 +01:00
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.
2016-03-03 15:57:55 +01:00
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.
2016-03-03 15:57:55 +01:00
l10n daemon script
d678ffc8c5 SVN_SILENT made messages (.desktop file) 2016-03-03 13:12:24 +00:00
l10n daemon script
9130bf6dae 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"
2016-03-03 09:58:22 +00:00
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.
2016-03-03 08:00:55 +01:00
Jonathan Riddell
a74ed633d1 Update version number for 5.6.90
GIT_SILENT
2016-03-02 15:54:33 +00:00
Jonathan Riddell
72dbdaad06 Update version number for 5.5.95
GIT_SILENT
2016-03-02 13:47:41 +00:00
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)
2016-03-02 08:34:41 +01:00
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"
2016-03-01 13:09:20 +00:00
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
2016-02-29 09:48:59 +01:00
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
2016-02-27 11:26:51 +01:00
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"
2016-02-27 09:32:00 +00:00
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
2016-02-26 10:28:47 +01:00
Martin Gräßlin
6ae4775651 Fix fallback resolution in WaylandCursorTheme
If we find an cursor we shouldn't return null.
2016-02-25 14:05:20 +01:00
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.
2016-02-25 13:53:23 +01:00
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>
2016-02-25 12:47:25 +01:00
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.
2016-02-25 09:15:41 +01:00
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.
2016-02-25 09:12:22 +01:00
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.
2016-02-25 08:14:48 +01:00
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.
2016-02-25 08:14:48 +01:00
Martin Gräßlin
873e2b0320 Add support for Move/Resize cursor mode 2016-02-25 08:14:48 +01:00
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.
2016-02-25 08:14:48 +01:00
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 ).
2016-02-25 08:14:48 +01:00
Martin Gräßlin
5acf9abda8 Merge branch 'Plasma/5.5' 2016-02-25 08:07:30 +01:00
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
2016-02-25 08:04:09 +01:00
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"
2016-02-24 09:14:01 +00:00
David Rosca
a982367a75 Morphingpopups: Don't skip small steps
Resize may happen in smaller steps, so we should not skip them.

REVIEW: 127137
2016-02-23 19:13:45 +01:00
Martin Gräßlin
5b945d2b1c Try alternative cursor names in WaylandCursorTheme::get
If resolving a cursor fails, let's also try the alternative cursor
names.
2016-02-22 13:33:21 +01:00
Martin Gräßlin
72a25aa9ff Add Cursor::cursorAlternativeNames
Make the internal hash of cursor names available.
2016-02-22 13:33:21 +01:00
Martin Gräßlin
ecfe247598 Set proper size when loading with wl_cursor_theme_load
The theme doesn't load if we pass an incorrect size. This change
implements a resolution dependency size resolution inspired by the
one in Cursor::loadThemeSettings. Ideally this would be a size
different for each screen. As we don't have support for this yet, we
go for first screen.
2016-02-22 13:33:21 +01:00
l10n daemon script
53bc6b803b 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"
2016-02-22 10:55:49 +00:00
Martin Gräßlin
9eeef2d9ca Fix mouse action on (in)active window
Small regression: the command didn't get updated at all, so it was always
MouseNothing.

To prevent such a regression to sneak in again the change comes with
autotest for the action on inactive and active window.
2016-02-22 10:07:02 +01:00
Martin Gräßlin
4d7c8ac372 Connect to dbus signal reloadConfig from org.kde.keyboar /Layouts
By connecting to the signal KWin can reload the keyboard layout
configuration and adjust to changes in the configuration module.
2016-02-22 08:17:45 +01:00