Commit graph

13383 commits

Author SHA1 Message Date
Martin Gräßlin
93ef184356 PluginEffectLoader doesn't use KPluginTrader any more
Requires that plugins change to new KPlugin json metadata.
2015-07-07 09:36:15 +02:00
Martin Gräßlin
b01b03aa84 [scripting] Find scripts through KPackage
Another sycoca usage gone.
2015-07-07 08:48:24 +02:00
Martin Gräßlin
5b111cc467 [tabbox] Locate layouts through KPackage instead of KService
Another usage of ksycoca gone.
2015-07-07 08:28:38 +02:00
Martin Gräßlin
2cd6efa409 Switch decoration loading to KPluginLoader::findPluginsById
Removes a dependency to sycoca cache, but requires the plugin
metadata in the json file to use the new format.
2015-07-07 08:06:34 +02:00
Martin Gräßlin
ca14073b54 Port scripted effect loading from KService to KPackage
Advantage: no more ksycoca cache for loading scripted effects.
2015-07-06 16:50:33 +02:00
Martin Gräßlin
a4ca6f196e [wayland] kwin_wayland is no longer a kdeinit_executable
kdeinit_executable doesn't make sense in the case of kwin_wayland as
start_kdeinit_wrapper will be executed after kwin_wayland thus the
framework doesn't work.
2015-07-06 09:57:30 +02:00
Martin Gräßlin
3041a7c32d [wayland] Add a plugin for kglobalaccel
The KGlobalAccelD which gets created by KWin needs a plugin for the
platform specific parts. This change introduces such a plugin. It's
linked against kwin so that it can integrate with the core.

On enable the plugin registers itself in the InputRedirection and
GlobalShortcutsManager checks the plugin whether a shortcut got
triggered.

As the loading of the plugin must happen after InputRedirection is
fully created a dedicated init method is added to InputRedirection.

REVIEW: 124187
2015-07-02 13:42:29 +02:00
Martin Gräßlin
8461344ce1 [wayland] Create a KGlobalAccelD during startup
We need to grab the DBusInterface before anything interacts with
org.kde.kglobalaccel to prevent kglobalaccel5 from starting.
2015-07-02 13:22:23 +02:00
David Edmundson
37c7e4c256 Fix screenedgeshow manual test 2015-07-01 14:06:30 +01:00
Nerdopolis Turfwalker
924b66c4d5 Check whether it's platform xcb before calling QX11Info::display()
Internally QX11Info::display() calls into QPA native interface and
tries to resolve the nativeResourceForIntegration for "display".
Unfortunately this key also exists in other QPA plugins, e.g. in
QtWayland.

Calling without a check on platform results on wayland qpa in
wl_display* being casted into Display*.

REVIEW: 124203
2015-06-29 13:56:56 +02:00
Martin Gräßlin
4c03115882 [backends/drm] Fix crash in cleanup of DrmOutput
During cleanup the KWayland::OutputInterface is already destroyed before
we hit the cleanup code of DrmOutput. Thus guard with a QPointer to not
delete twice.
2015-06-29 12:47:29 +02:00
l10n daemon script
9af31e8024 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-06-29 10:30:43 +00:00
Martin Gräßlin
94827c7405 [wayland] Introduce automatic backend selection
If none of the backend specific command line options are passed, we
try to autmatically determine the proper plugin.

1. if DISPLAY is set -> x11 backend
2. if WAYLAND_DISPLAY is set -> wayland backend
3. if compiled with libhybris and ANDROID_ROOT is set -> hwcomposer backend
4. if compiled with DRM -> drm backend
5. if nothing selected yet, fallback to fbdev
2015-06-29 11:59:27 +02:00
Martin Gräßlin
fa7b2fd055 [wayland] Improve passing env variables to applications started by KWin
If an env variable is set outside of KWin (e.g. QT_QPA_PLATFORM) we
want KWin to pass the original env variable to the started process and
not pass none instead because it's one of KWin's special changed
variables.

Thus we take the environment before we adjust it and pass that to the
started processes with our own DISPLAY and WAYLAND_DISPLAY added.
2015-06-29 10:51:37 +02:00
Martin Gräßlin
085c77810b [wayland] Create PlasmaWindow as child of AbstractClient
Ensures that the PlasmaWindow gets destroyed together with the window.
Note: when a ShellClient gets unmapped the PlasmaWindow does not yet
get destroyed. It should probably get destroyed and recreated on next
mapping.
2015-06-29 10:09:15 +02:00
l10n daemon script
b5b8dee854 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-06-28 10:04:21 +00:00
Rohan Garg
c22fdcf146 Return unless glDebugMessageCallback resolves on GLES
REVIEW: 124135
2015-06-26 12:43:08 +02:00
Martin Gräßlin
67734050e6 [hwcomposer] Get refresh rate 2015-06-25 18:04:06 +02:00
Martin Gräßlin
53dcd98b8b [hwcomposer] Switch to format HAL_PIXEL_FORMAT_RGB_888
We clearly do not need an alpha channel for our scene.
2015-06-25 15:49:52 +02:00
Martin Gräßlin
48bf38e830 [wayland] Trigger update of client area when the panel behavior changes 2015-06-25 09:04:51 +02:00
Martin Gräßlin
1f6c0c07f7 [effects] Support blitScreenshot on OpenGLES
As OpenGL ES 3.0 supports framebuffer blit, we don't have to ifdef it
any more.
2015-06-24 09:40:53 +02:00
Martin Gräßlin
59a6c9ddf9 [libkwineffects] OpenGL ES 3.0 supports glBlitFramebuffer 2015-06-24 09:39:02 +02:00
Martin Gräßlin
b8ae823b50 [hwcomposer] Announce support for pointer
Without announcing pointer support the touch-to-pointer translation
in KWayland::Server might not work.
2015-06-24 08:41:10 +02:00
Martin Gräßlin
7e1e044948 [wayland] Break showing desktop from ShellClient::takeFocus
Logic similar to Client::takeFocus: if window is keep above or on
screen display do not break. Also if window belongs to the same
ClientConnection as a desktop window don't break.
2015-06-23 11:08:28 +02:00
l10n daemon script
4b8fabca40 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-06-22 10:30:10 +00:00
Martin Gräßlin
8b6fef457b [wayland] Export themed icon name to PlasmaWindow interface
If the icon doesn't have a name, we pass the generic xorg icon. Most
likely our xwayland clients won't have a theme name, so giving them
the xorg icon seems a good enough work around. If we would want to
pass the real icon for xwayland clients we would need a way to
serialize them which seems like quite some needless overhead for legacy
applications. Can be considered for the future nevertheless.
2015-06-20 02:48:48 +02:00
Martin Gräßlin
31e599a63d [wayland] Provide icon from ShellSurface's windowClass
We can use the window class to locate a desktop file and from this
we can load a themed icon.
2015-06-20 01:11:42 +02:00
Martin Gräßlin
2192bd69e0 [wayland] Add support for PanelBehavior in ShellClient
The PanelBehavior determines the stacking of panel surfaces and whether
they "have a strut".
2015-06-20 00:14:49 +02:00
Martin Gräßlin
1ccd608121 Move hasStrut from Client to AbstractClient
Base implementation returns false.
2015-06-20 00:14:15 +02:00
Martin Gräßlin
69d78fe8db Fix unused variable warning 2015-06-20 00:12:22 +02:00
Thomas Lübking
39c35f8f48 fix sendToScreen/checkWorkspaceGeometry
Prime target is to preserve the in-screen
condition of client AND window.i[1]
Atm. when the client is fully in sight
(but the window is not) - regardless of snapping
or screen change - a workspace update (screen change,
resolution change, adding/removing a strutting panel)
would allow the client to partiall escape screen bounds.

This is changed so that if the client is fully in sight,
it's kept fully in sight (but not the decoration)
If the entire window was fully in sight, it's also kept
(as is right now)
The code handles inner screen edges (if the client was in sight,
the entire window will be if we'd bleed to the other screen)

[1] I'd say that handling the client is more relevant,
but foresee more complaints if the window wasn't handled anymore ;-)

During that, i stumbled across some other issues.
- when a window centered on one screen is moved to a screen smaller
  than the window, the window is shrinked to the dimensions of that
  screen and now randomly touches eg. left AND right edge. When
  moved back, the right and bottom edge were preferred
  (to the window was "moved" into the lower right corner).
  It's now kept centered.
- geom_restore was saved before keeping the window in the new
  screen area (causing accidental drops on screen changes)

BUG: 330968
REVIEW: 122517
FIXED-IN: 5.4

Prime target is to preserve the in-screen condition
of client AND window.[1]
Atm. when the client is fully in sight (but the window is not) -
regardless of snapping or screen change - a workspace update
(screen change, resolution change, adding/removing a strutting
panel) would allow the client to partiall escape screen bounds.

This is changed so that if the client is fully in sight,
it's kept fully in sight (but not the decoration)
If the entire window was fully in sight, it's also kept
(as is right now)
The code handles inner screen edges (if the client was in sight,
the entire window will be if we'd bleed to the other screen)

[1] I'd say that handling the client is more relevant,
but foresee more complaints if the window wasn't handled anymore ;-)

During that, i stumbled across some other issues.
- when a window centered on one screen is moved to a screen
smaller than the window, the window is shrinked to the dimensions
of that screen and now randomly touches eg. left AND right edge.
When moved back, the right and bottom edge were preferred
(to the window was "moved" into the lower right corner).
It's now kept centered.
- geom_restore was saved before keeping the window in the new
screen area (causing accidental drops on screen changes)

BUG: 330968
REVIEW: 116029
FIXED-IN: 5.3
2015-06-19 19:48:39 +02:00
Thomas Lübking
d053c31571 don't offer to set window shortcut if rule forced
since the rule would trump the configured shortcut

BUG: 332184
FIXED-IN: 5.4
REVIEW: 124125
2015-06-19 19:47:51 +02:00
Martin Gräßlin
ccd8f50b63 [wayland] Connect state change requests from PlasmaWindowInterface
This should be enough for libtaskmanager to manage the windows.
2015-06-19 17:10:51 +02:00
Martin Gräßlin
3c2c1d31c9 [wayland] Add support for closeWindow request in PlasmaWindowInterface 2015-06-19 01:50:25 +02:00
Martin Gräßlin
97588faea2 [wayland] Add support for input shape
Toplevel provides the input shape forwarded from SurfaceInterface. The
shape is evaluated in InputRedirection when finding the Toplevel at a
given position.
2015-06-18 23:19:13 +02:00
Thomas Lübking
7b842ccc81 checkOffscreenPosition on restored session geoms
BUG: 336193
FIXED-IN: 5.4
REVIEW: 124122
2015-06-18 22:41:26 +02:00
Thomas Lübking
acb8016e65 make checkOffscreenPosition multiscreen aware
on a multiscreen setup, the window can be off in multiple directions

CCBUG: 336193
REVIEW: 124122
2015-06-18 22:41:26 +02:00
Martin Gräßlin
171bbd662a [wayland] Export more states to PlasmaWindowInterface 2015-06-18 21:15:20 +02:00
Martin Gräßlin
f5724b9a55 [wayland] Unmap PlasmaWindowInterface instead of destroying it
The unmap triggers a destroy on client side and also triggers the
automatic cleanup of the PlasmaWindowInterface instance.
2015-06-18 00:22:48 +02:00
Martin Gräßlin
183479fe67 [wayland] Only create PlasmaWindowInterface if AbstractClient has a surface
With Xwayland clients it can happen that the window gets destroyed
before it ever got a surface (Qt 5's file open dialog being an example).

This change delays such clients till it got the surface, removing not
needed roundtrips and possible problems.
2015-06-18 00:22:48 +02:00
Thomas Lübking
3442664609 port session management to KF5
REVIEW: 123580
BUG: 341930
2015-06-18 00:18:53 +02:00
David Edmundson
268eb70016 [hwcomposer] Only update the attached screen 2015-06-17 15:08:49 -07:00
Martin Gräßlin
0b00af25dc [wayland] Announce AbstractClient to PlasmaWindowManagement interface
Creates a PlasmaWindowInterface for each AbstractClient and so far
passes caption and virtual desktop through.
2015-06-16 06:50:22 +02:00
Martin Gräßlin
6e58d50efa [wayland] Drop EGL_PLATFORM env variable from QProcessEnvironment passed to launched processes
Can result in interesting crashes of the launched processes, if KWin uses
e.g EGL_PLATFORM=hwcomposer.
2015-06-13 21:29:56 +02:00
Boudewijn Rempt
d457a8d92b This line wasn't intended to go in. 2015-06-13 19:10:33 +02:00
Martin Gräßlin
859a3bb598 [wayland] Add support for PlasmaWindowManagement interface
So far this only allows to trigger show desktop functionality and exports
the state.

In future this should be restricted to just one dedicated desktop shell
process.
2015-06-13 18:23:54 +02:00
Martin Gräßlin
01ac0abfd7 [wayland] Change keyboard focus window when active window changes
We used to change it only on keypresses. This resulted in the strange
situation that e.g. the input method virtual keyboard doesn't show up
until one presses a real key, because e.g. maliit only activates the
keyboard if there is an active focus object in the Qt application.
2015-06-13 17:54:08 +02:00
Boudewijn Rempt
98bcdbe70a [wayland] Add a command-line option to start an input method server
Input-method servers, like maliit, need to be known to KWin since KWin
needs to know about virtual keyboards. Virtual keyboards should be shown
as OSD layers, and they are one of the types of windows that actually
should be showable when the lock screen is active.

kwin_wayland --inputmethod /path/to/your/input-server

tries to start the input server. The input-server's window never gets
keyboard focus and is shown on top of all windows except for KWin's
internal clients.
2015-06-13 04:06:12 +02:00
Boudewijn Rempt
1d78430acc A shell client's layer is OSD if it's OSD 2015-06-13 04:05:15 +02:00
Boudewijn Rempt
63e877a0e3 Fix typo 2015-06-12 23:10:31 +02:00