Commit graph

13890 commits

Author SHA1 Message Date
Martin Gräßlin
f8e7d58dea Refactoring of EglOnXBackend to allow implementing subclasses
The aim is to allow having an implementing subclass which uses
multiple windows to render to.
2015-11-26 08:33:07 +01:00
Martin Gräßlin
b1914b4b2c Add pure virtual OpenGLBackend::init() method
All backends already have an init method so far called from the ctor.
This change moves the call to init out of the OpenGL backends and makes
it the responsibility of the creating code to also call init on the
backend.

This change makes it easier to have virtual methods being called during
the initialization.
2015-11-26 08:33:07 +01:00
Martin Gräßlin
8b4d1a2f3f [wayland] Properly set position of OutputInterface on creation
Before all outputs were positioned at 0/0 in a multi-nested window
setup.
2015-11-26 08:33:07 +01:00
Martin Gräßlin
56bd1e7194 [wayland] Add support for initial output count for nested compositors
Added to x11 backend which creates one window per output.

New command line option is called --output-count=<int>.
2015-11-26 08:33:07 +01:00
Martin Gräßlin
1e3013b58c [backends/x11] Prepare for multi-output rendering
The backend is prepared for managing multiple x11 windows. Currently
it's still only one window, but it's all internally working through
the architecture for multiple windows.
2015-11-26 08:33:07 +01:00
Martin Gräßlin
f5905e5e48 [backends/x11] Prepare QPainter backend for multi screen rendering
The backend is in principal ready to render to multiple X11 windows.
This will allow simulating a multi screen setup.
2015-11-26 08:33:07 +01:00
Martin Gräßlin
ee7f70afc8 [wayland] BasicScreens can serve multiple screens
For this AbstractBackend has a new virtual screenGeometries() method
which returns a QVector<QRect>. By default it's just one QRect at 0/0
with the size of the one screenSize().
2015-11-26 08:33:07 +01:00
Martin Gräßlin
7c5fc2ff96 Merge branch 'Plasma/5.5' 2015-11-26 08:31:52 +01:00
Martin Gräßlin
38cde38edf Ensure Scene doesn't render non lock screen windows while screen is locked
The last stage for window rendering is triggered by
Scene::finalDrawWindow. Adding a security check there if screen is locked
no non-lock screen window should be rendered.

Unfortunately this method is virtual so the check needs to be done in the
base and all implementing child methods (currently only OpenGL).

REVIEW: 126144
2015-11-26 08:30:57 +01:00
Martin Gräßlin
3e007b5198 [effects] Disable more effects while screen is locked
Most of those effects didn't need special screen locking handling on
X11 as they prevented screen locking. On Wayland though, we don't
want the lock screen shown on a cube.

REVIEW: 126122
2015-11-26 08:30:29 +01:00
l10n daemon script
c69c46d8ca SVN_SILENT made messages (.desktop file) 2015-11-25 18:20:33 +00:00
l10n daemon script
2a444656e6 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"
2015-11-25 15:48:08 +00:00
Thomas Lübking
117e7a9823 Merge branch 'Plasma/5.5' 2015-11-25 00:01:26 +01:00
Thomas Lübking
3525d1ce02 explicitly update the stack track on unminimization
the stackingOrderChanged() signal came before the window turned an effect window
usually this is no problem as the change shall not be caught anyway, but
the window may have changed its stack position

BUG: 353745
FIXED-IN: 5.5
REVIEW: 126134
2015-11-24 22:38:49 +01:00
Thomas Lübking
e2632f3816 correctly scale and position logout window
window wasn't correctly represented in
zoom, present windows and desktop grid effects

on the fly code streamlining:
- logout and above windows were handled equally in different code paths
- windows were painted on 0 opacity instead of just aborting the paint

local semi-paintdata because PaintData isn't assignable
(const dptr, I think) and we're post freeze.

BUG: 355539
FIXED-IN: 5.5
REVIEW: 126133
2015-11-24 22:38:01 +01:00
Martin Gräßlin
6fa3c58951 Merge branch 'Plasma/5.5' 2015-11-23 11:49:35 +01:00
Martin Gräßlin
3361373445 [backends/hwcomposer] Announce support for DPMS
Hooked up to toggle blank output dependent on state.

REVIEW: 126095
2015-11-23 11:48:39 +01:00
l10n daemon script
0c453d520f 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"
2015-11-22 09:56:21 +00:00
Jonathan Riddell
c1e991068e Update version number for 5.5.90
GIT_SILENT
2015-11-19 13:14:04 +00:00
Jonathan Riddell
d7398c4f50 Update version number for 5.4.95
GIT_SILENT
2015-11-19 11:39:24 +00:00
Martin Gräßlin
416d8060cf Don't query for GL_CONTEXT_FLAGS if not at least OpenGL 3.0
Patch by Thomas Lübking.

BUG: 355522
2015-11-19 11:20:33 +01:00
Martin Gräßlin
23784d2038 [wayland] Introduce an additional --exit-with-session command line arg
This is similar to the applications to start. That is the value of the
command line argument is interpreted as a command to start.
The difference is that when this application exits, KWin will also quit.
The argument is so to say interpreted as a session.

Reviewed-By: Bhushan Shah
2015-11-19 09:28:51 +01:00
Martin Gräßlin
eabddf939b Add path to kwin_wayland binary to KWin's installed CMakeConfig
The absolute path is needed by e.g. startplasmacompositor.

REVIEW: 126106
2015-11-19 09:28:16 +01:00
Yuri Chornoivan
7a57e8c20a Fix minor typo 2015-11-18 19:07:09 +02:00
Martin Gräßlin
681113e4a6 [wayland] Reset internalWindow if the QWindow gets destroyed
Prevents use after free usages.

Reviewed-By: Bhushan Shah
2015-11-18 15:43:54 +01:00
Martin Gräßlin
4d883a9cda Ensure pointer position is updated before screen locker enforcement
We need to update the pointer position, also if the screen is locked.
Otherwise the pointer doesn't move on the locked screen with libinput.

In addition we need to use the m_globalPointer for finding the correct
lock screen window as updatePointerWindow also does sanity checking on
the coordinates.

Also we need to introduce security checks where we use the signal.

REVIEW: 126103
2015-11-18 14:42:23 +01:00
Martin Gräßlin
3be016fba4 [wayland] Destroy all ClientConnections on tear down
Ensures that all Wayland objects are destroyed and the cleanup handling
is performed before tearing down the Compositor. This fixes for example
a crash if a Surface with a Shadow is still around at tear down.
2015-11-18 10:29:10 +01:00
Thomas Lübking
12b63e2aa7 remove deleted windows from motionmanagers
Eg. if a window is closed while "timeline.currentValue() == 0",
slotWindowClosed() will shortcut exit and not be removed from the
managers, thus dangle around forever.

Maybe there're other ways for a window to be deleted w/o
the closed slot being entered.

CCBUG: 339970
REVIEW: 126034
2015-11-17 21:30:43 +01:00
Thomas Lübking
a4791e629d Add rule to protect the focus on a window
This allows to pin the focus on certain window as well
as to more easily give it away on others (typically launchers)

BUG: 185060
CCBUG: 337798
FIXED-IN: 5.5
REVIEW: 126059
2015-11-17 21:30:05 +01:00
Thomas Lübking
37a64dcf5f catch lost FOCUS_POINTER_ROOT FOCUS_IN events
it seems we can "loose" focus reversions when the closing client hold a grab
(eg. the screenlocker or some games) thus we catch the typical pattern
(though we don't want the focus on the root anyway)

BUG: 348935
FIXED-IN: 5.5
REVIEW: 126033
2015-11-17 21:29:45 +01:00
Martin Gräßlin
01451eea36 Revert "Handle conflicts between epoxy and manually resolved function pointers"
This reverts commit ac1dbac8b1.
2015-11-17 14:58:59 +01:00
Martin Gräßlin
e71a230213 [hwcomposer] Add support for backlight through light_device_t
We use the hw module's backlight and set the color to either 0
or FF depending on whetehr we want to have the screen on or off.
This turns the backlight off properly. It is bound to the toggleBlank
functionality so that we always turn on/off the backlight depending
on whether our compositor is on or off.

In addition we listen to key release events on the power button to
toggle the state.

REVIEW: 126083
2015-11-17 14:45:34 +01:00
Martin Gräßlin
8d00355448 [hwcomposer] Don't waitVsync if we haven't activated vsync yet
Would just hit the timeout, no need to wait 16 msec for nothing.
2015-11-17 14:45:34 +01:00
l10n daemon script
6bb9f6db7b 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"
2015-11-17 13:07:36 +00:00
Martin Gräßlin
57a3cea142 [backends/hwcomposer] Base HwcomposerScreens on BasicScreens 2015-11-17 10:49:09 +01:00
Martin Gräßlin
eb81ddfb86 [backends/fbdev] Use BaseScreens implementation 2015-11-17 10:46:32 +01:00
Martin Gräßlin
898eefc6be [backends/wayland] Use BasicScreens implementation 2015-11-17 10:43:10 +01:00
Martin Gräßlin
7b12e55857 [backends/x11] Use BasicScreens implementation 2015-11-17 10:40:17 +01:00
Martin Gräßlin
fb4d59abb7 [wayland] Add a base implementation for Screens in a basic setup
X11, Wayland, virtual, Framebuffer and hwcomposer have extremely
similar screens implementations. Let's add a base implementation
for them as a BasicScreens.
2015-11-17 10:39:39 +01:00
Martin Gräßlin
cab25fc13f [backends/wayland] Drop warning messages concerning egl backend
From a time before we split into platform plugins.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
75c82fce19 [backends/wayland] Only set socket name if it got sepcified
If we don't have a dedicated device identifier we should use the default
mechanismn which involves using the WAYLAND_DISPLAY or WAYLAND_SOCKET env
variable.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
930e56767e [backends/wayland] Do not query outputs
Not needed, we use a nested window.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
df71c5b61b [backends/wayland] Simplify WaylandScreens by basing on ShellSurface size
It's a screen for a nested setup - no need for integrating with Wayland's
output for that.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
9381d3f88c [backends/wayland] Drop XRandR updating
No longer needed as we use Xwayland.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
3f6cb8812b [backends/wayland] ShellSurface opened as a toplevel instead of fullscreen
Going towards nested setup.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
eafded7127 [backends/wayland] Drop subsurface for cursor
As we don't use the fullscreen shell any more, we use the "normal"
cursor image handling of wl_seat.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
1ca690d4ee [backends/wayland] Drop support for fullscreen shell
We are going to switch to a proper nested approach similar to the
x11 backend. Given that we don't want to run on fullscreen anymore
but just open a nested window.
2015-11-17 09:51:50 +01:00
Bhushan Shah
42ddf685c1 [InputRedirection] Don't crash on invalid Toplevel
Reviewed-By: Martin Gräßlin
2015-11-16 20:57:23 +05:30
Martin Gräßlin
38f19dafb2 Add safety check to Deleted::~Deleted for tear-down
It's possible that the Deleted gets created before destroying Workspace
and due to the deleteLater outlives Workspace. In that case we may not
call into Workspace as this might crash.
2015-11-16 14:14:07 +01:00
Martin Gräßlin
deb63fa344 Cancel loading in EffectsLoader on tear down
When unloading all effects we should make sure that also the ones
scheduled for loading are canceled. For this a new method clear()
is added to the AbstractEffectLoader and all inheriting classes which
clears the current load queue. For the scripted and plugin effect loader
it should also cancel the future, but that's not yet implemented.
2015-11-16 14:06:23 +01:00