Commit graph

12510 commits

Author SHA1 Message Date
Martin Gräßlin
689a3a1c5e Emit signals from Client when allowed actions change 2014-07-25 14:02:27 +02:00
Martin Gräßlin
7154cfee42 Drop size from Client::resizeDecoration
No longer used.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
2b20aa8bd0 Drop CoordinateMode from Client::layoutDecorationRects
It's unused without the padding.
2014-07-25 14:02:27 +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
d3a91b67d9 Emit a signal if the QuickTileMode changes 2014-07-25 14:02:27 +02:00
Martin Gräßlin
750f61fa55 React on border size changes of the Decoration
This replaces the checkBorderSizes. Maybe the most dangerous change
in the scope of introducing the new Decorations.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
0151b224e3 Bring back extended borders
No longer provided as a region but by dedicated border values to all
directions.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
796ac23672 Provide isCloseOnDoubleClickOnMenu in DecorationSettingsImpl
Needs proper implementation taking from config value.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
c1edbd584b Add support for WheelEvents on Decoration
Forwarded to the Decoration and reacts on emitted signal.
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
8bf2a9855a Handle double click on Decoration title bar
Passed to the proper event handler in Workspace.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
98a5c4e050 Allow Client to disable the rendering of DecorationShadow
For maximized and fullscreen windows we don't want the shadow to be
renderer at all.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
08d146de91 Introduce support for DecorationShadow
Surprisingly the DecorationShadow is modelled after the Shadow in KWin.
It provides the same offsets and a QImage exactly like the OpenGL
implementation needs it. This makes it easy to hook it into our existing
Shadow implementation with only a few changes.

Shadow now first tries to create a Shadow from the Decoration and only
if that fails it tries the X11 property. The pixmaps are not initialized
for the DecorationShadow and because of that currently only the OpenGL
backend gets initialized for DecorationShadows. The other backends might
need adjustments and also a transition to just using one image.
2014-07-25 14:02:27 +02:00
Martin Gräßlin
b12d11a06c Add border size to the implementation of DecorationSettings
Not yet read from any config value.
2014-07-25 14:02:27 +02:00
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