Commit graph

12296 commits

Author SHA1 Message Date
Martin Gräßlin
c12199a8e0 Pass Decoration::Renderer to Deleted and use it in the Scenes
The Renderer gets reparented to the Deleted. While passing it to
the Deleted the Scene's implementation can ensure that the buffers
are up to date. After passing to Deleted it's no longer allowed to
call the render method.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
a9587dd19d Bring back CloseButtonCorner in EffectsHandlerImpl
The setting should be per window and all button positions should just
get exported. This would be way more precise than checking the default
values.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
24a4a87bac Load settings for KDecoration2 based plugins
* library to load
* decoration buttons (based on old KDecoration1 implementation)
2014-07-25 14:02:27 +02:00
Martin Gräßlin
a019fa259c Load decoration plugin settings from meta data
This brings back the value whether the decoration requires blur behind.
2014-07-25 14:02:26 +02:00
Martin Gräßlin
30a84808f9 Port Client::decorationHasAlpha 2014-07-25 14:02:26 +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
l10n daemon script
2c78ff8bfd SVN_SILENT made messages (.desktop file) 2014-07-25 10:15:29 +00:00
Lukáš Tinkl
b3cf1f14cc Merge branch 'Plasma/5.0' 2014-07-23 03:36:34 +02:00
Lukáš Tinkl
0e4dd60507 i18n fixes 2014-07-23 03:35:36 +02:00
Martin Gräßlin
1e9b02411e Merge branch 'Plasma/5.0' 2014-07-22 13:22:48 +02:00
Martin Gräßlin
7f3b349ab3 Recommend OpenGL2 compositor for virtualbox and vmware
This ensures that those compositors are not forced to XRender.

BUG: 337560
FIXED-IN: 5.0.1
2014-07-22 13:21:23 +02:00
Fredrik Höglund
aa7f9f26f6 Fix the GLES build 2014-07-22 13:07:48 +02:00
Fredrik Höglund
b1586daab4 Remove the GL_QUADS_KWIN definition
GL_QUADS is always defined now that we're using libepoxy.
2014-07-22 12:56:32 +02:00
Fredrik Höglund
aae08b16e9 Add a WindowQuadShadow
And use this type for all the shadow quads in the OpenGL scene.
2014-07-22 12:28:20 +02:00
Martin Gräßlin
7744608a1d Drop SceneOpenGL::Window::textureForType
Dead code.
2014-07-21 15:04:44 +02:00
Fredrik Höglund
6ad4c775d7 Use a single texture atlas for the decoration
The left and right border images are rotated 90° before they are
uploaded into the atlas texture. The images are separated by a row
of transparent texels to minimize artifacts from oversampling.

With this change kwin renders the whole decoration with a single
call to glDrawArrays().
2014-07-17 09:39:17 +02:00
Fredrik Höglund
b7592ec6f0 Add a uvAxisSwapped property in WindowQuad
When this property is true, it indicates that the +U axis corresponds
to the +Y axis, and the +V axis corresponds to the +X axis.

This property is taken into account in WindowQuad::makeSubQuad().
2014-07-17 09:17:31 +02:00
l10n daemon script
5179d4d3c9 SVN_SILENT made messages (.desktop file) 2014-07-16 09:40:44 +00:00
Fredrik Höglund
d9c4b77f0f Make the GL extension list a QList<QByteArray>
It doesn't make sense to convert the extension names to QStrings.

This also replaces the QString parameter in hasGLExtension() with
a QByteArray and adjusts all callers.
2014-07-14 12:04:37 +02:00
Fredrik Höglund
3b8b1455a6 Use libepoxy to resolve GL functions
Remove the manually written GL dispatch code, and use libepoxy
to resolve functions.

The only exceptions are GLX_MESA_swap_control, which is not in
the XML API registry, and GL_ARB_robustness/GL_EXT_robustness.
For the latter we want to resolve the functions to the same names
on both GLES and desktop GL, and plug in our own implementations
when the extension is not supported.
2014-07-14 12:04:37 +02:00
Fredrik Höglund
01e1aef395 Find libepoxy 2014-07-14 12:04:37 +02:00
Fredrik Höglund
828a455fae Add Findepoxy.cmake 2014-07-14 12:04:37 +02:00
l10n daemon script
ae9689a105 SVN_SILENT made messages (.desktop file) 2014-07-14 03:49:40 +00:00
l10n daemon script
bd098e9080 SVN_SILENT made messages (.desktop file) 2014-07-13 03:59:17 +00:00
Hrvoje Senjan
79d29096f2 Drop explicit Qt5Widgets_EXECUTABLE_COMPILE_FLAGS
It is automagically pulled in by imported Qt5:: targets,
and also fixes build where POSITION_INDEPENDENT_CODE is not available.

REVIEW: 119237
2014-07-12 09:27:36 +02:00
Jonathan Riddell
97f38e3e87 bump versions for... Plasma 5.0! 2014-07-10 15:45:41 +02:00
Thomas Lübking
75a298a4fb allow FS mapping of geometry restricted windows
and copy isSpecialWindow() check as rulebook input
to setFullscreen()

Client::isFullScreenable() checks:
* fullscreen rule
* fullscreen_hack (-> for normal windows)
* geometry restrictions
* special window

Client::manage() for fullscreeining checks:
* fullscreen rule (with correct "initial" parameter)
* fullscreen_hack

-> this breaks the fullscreen rule for geometry restricted windows
and causes inconsistent behavior between client requests at runtime
(which do not test ::isFullScreenable()) and on mapping.

Otoh, the specialWindow() protection should apply generally - those
kind of windows should not be fullscreened since the user can not
exit this state via kwin for them - and there's hardly a good reason
for them to be fullscreen, esp. not to enter that state at runtime

REVIEW: 118442
CCBUG: 335617

Cherry-picked from kde-workspace
43229afee9fac4303e3d280ea63f96f034b3ffb5
2014-07-10 13:36:50 +02:00
Martin Gräßlin
5185fe81cf make trackmouse FX account paintdata scale/trans
REVIEW: 118537
CCBUG: 333012

cherry-picked from kde-workspace
e9919695e57612055acfc685707210c00a42ce00.

Original author: luebking
2014-07-10 13:36:44 +02:00
l10n daemon script
e231be7c7c SVN_SILENT made messages (.desktop file) 2014-07-10 04:23:36 +00:00
l10n daemon script
1a99520426 SVN_SILENT made messages (.desktop file) 2014-07-09 03:36:32 +00:00
Martin Gräßlin
c40bdc1bb2 [aurorae] Use QMutexLocker in AuroraeClient's dtor
It's possible that the rendering thread is still writing to the
buffer and if we destroy the buffer before it's finished KWin is going
to crash. So let's mutex lock the dtor to ensure that the rendering
thread finishes before we tear down the client.

BUG: 336950
2014-07-07 13:49:10 +02:00
l10n daemon script
69ae6a6d22 SVN_SILENT made messages (.desktop file) 2014-07-07 08:36:00 +00:00
Martin Gräßlin
558e357575 [aurorae] Fix MaximizeRestore Button of Aurorae Themes
Seems like porting to new infrastructure was incomplete. The
MaximizeRestore button consists of two buttons on top of each other with
an own mouse area in each and both always visible. This means the restore
button was stealing the mouse events of the maximize button breaking
maximization.

The solution is to have an additional MouseArea which controls the whole
button making the two button types just visualization.
2014-07-07 08:38:41 +02:00
l10n daemon script
e8e650b9f2 SVN_SILENT made messages (.desktop file) 2014-07-06 08:35:53 +00:00
l10n daemon script
eb6013655d SVN_SILENT made messages (.desktop file) 2014-07-05 08:34:14 +00:00
Thomas Lübking
c654dd4ff1 WORKAROUND bug #335926
QXcbScreen overrides the input eventmask when
adding a screen, so we claim our stuff back

BUG: 335926
REVIEW: 118765
2014-07-03 18:39:38 +02:00
Thomas Lübking
c455087248 add selectWmInputEventMask function
It sets the mask required for a WM and in addition
preserves the eventmask present on the root window for
this client (as set by any lib etc.)
2014-07-03 18:39:38 +02:00
Thomas Lübking
ddd8ea4c74 fix spinbox width
BUG: 336150
2014-07-03 18:39:38 +02:00
Martin Gräßlin
f0e1e3187e Add a script to enforce window decorations for GTK windows
This is going to be a controversal change. It enforces KWin decorations
on all client side decorated windows from GTK+. Unfortunately we are
caught between a rock and a hard place. Keeping the status quo means
having broken windows and a more or less broken window manager due to
GTK+ including the shadow in the windows. This is no solution.
Enforcing server side decorations visually breaks the windows. This is
also no solution. So why do it?

It's our task to provide the best possible user experience and KWin is
a window manager which has always done great efforts to fix misbehaving
windows. One can think of the focus stealing prevention, the window rules
and lately the scripts. The best possible window management experience is
our aim. This means we cannot leave the users with the broken windows
from GTK.

The issues we noticed were reported to GTK+ about 2 months ago and we are
working on improving the situation. Unfortunately several issues are not
yet addressed and others will only be addressed in the next GTK+ release.
We are working on improving the NETWM spec (see [1]) to ensure that the
client side decorated windows are not in a broken state. This means the
enforcment is a temporary solution and will be re-evaluated with the next
GTK release. I would prefer to not have to do such a change, if some of
the bugs were fixed or GTK+ would not use client-side-decos on wms not
yet supporting those all of this would be a no issue.

For a complete list of the problems caused by GTK's decos see bug [2] and
the linked bug reports from there.

The change is done in a least inversive way in KWin. We just check for
the property _GTK_FRAME_EXTENTS and create a Q_PROPERTY in Client for it.
If we add support for the frame extents in future we would also need
this. So it's not a change just for enforcing the decoration.

The actual enforcing is done through a KWin script so users can still
disable it.

REVIEW: 119062

[1] https://mail.gnome.org/archives/wm-spec-list/2014-June/msg00002.html
[2] https://bugzilla.gnome.org/show_bug.cgi?id=729721
2014-07-03 16:03:22 +02:00
Martin Gräßlin
8bdbe4dc15 Add default shortcuts for virtual desktop switching actions
This makes the virtual desktop KCM properly show Ctrl+F1-F4 as the
default shortcuts for switch to desktop.

REVIEW: 119051
2014-07-03 16:02:34 +02:00
Jonathan Riddell
ce48a1b27b bump version for Plasma 5 RC release 2014-07-03 15:22:25 +02:00
Sebastian Kügler
70015e2bed Fix category for kwindecorations kcm 2014-07-01 16:23:40 +02:00
Sebastian Kügler
b82bce4d5b Adapt to latet changes from review 2014-07-01 12:44:42 +02:00
Sebastian Kügler
b5000a21b7 Adapt to new systemsettings categories
Roughly, this moves the systemsettings-visible KCModules under either
Workspace | Window Behavior and Workspace | Desktop Behavior, as laid
out here: http://forum.kde.org/viewtopic.php?f=285&t=121053&start=30#p313837
2014-07-01 12:44:41 +02:00
Martin Gräßlin
7c745ef991 [aurorae] Use NativeRendering for decoration title 2014-06-30 14:33:09 +02:00
Martin Gräßlin
6e195331f6 Revert "set QSG_RENDER_LOOP as basic if not explicitly set"
This reverts commit c09d63d192.

The test results we got indicate that on NVIDIA the problems with the
threaded rendering loop do not exist and at the same time the rendering
result improves a lot. As Qt still disables the threaded rendering loop
for the problematic drivers, it's better to not force the basic rendering
loop.
2014-06-30 14:21:40 +02:00
l10n daemon script
28c7f3c47d SVN_SILENT made messages (.desktop file) 2014-06-29 08:41:34 +00:00
Hrvoje Senjan
25c731ab7e Install KWin icons to hicolor namespace
1) helps avoid clashing with 4.x version
2) it's more correct to have them in hicolor

REVIEW: 118932
2014-06-27 13:20:49 +02:00
Martin Gräßlin
27ac23ba19 [effects] Rename text of ToggleMouseClick action
"Toggle Effect" is too generic as it's used in the steal shortcut dialog.

REVIEW: 118912
2014-06-24 09:40:13 +02:00
Martin Gräßlin
e8241313fc [libkwineffects] Require strict binding for intel driver
According to driver devs it's a "buggy micro-optimisation", see
https://bugs.freedesktop.org/show_bug.cgi?id=80349#c1

BUG: 336589
REVIEW: 118893
2014-06-24 09:26:46 +02:00