Commit Graph

13501 Commits (3bcd24b00917c25cfb004d85c7ca6fced8f71cac)

Author SHA1 Message Date
Martin Gräßlin 63bdc54b32 [tabbox] Fix loading of default layout
BUG: 350029
2015-07-09 19:34:18 +02:00
Martin Gräßlin a687a58e82 [wayland] Perform mouse command on AbstractClients on touch down
If the touch window changes we simulate a left press and perform
the mouse command for a left button.

Note: this is not yet tested on real system.
2015-07-09 16:34:19 +02:00
Martin Gräßlin 0c0ad87caf [wayland] Activate AbstractClient from InputRedirection on mouse button press
This only handles button presses without modifiers so far.
2015-07-09 16:34:19 +02:00
Martin Gräßlin c3b7ed907b Move logic to handle mouse buttons on windows to AbstractClient
Part of the logic is split out in a generic way so that the code
can be shared with activating of Wayland clients.
2015-07-09 16:34:19 +02:00
Martin Gräßlin 8d407157c4 Provide a base implementation for performMouseCommand in AbstractClient
Most commands can be operated directly in AbstractClient already which
means less code duplication to make the commands work for wayland
clients.
2015-07-09 16:34:19 +02:00
Martin Gräßlin 9a8f94f8fc Workspace::gotFocusIn and ::shouldGetFocusIn changed to operate on AbstractClient 2015-07-09 16:34:19 +02:00
l10n daemon script 726b1addd2 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-07-09 11:30:25 +00:00
Martin Gräßlin 810ed5d396 [wayland] Add support for FakeInput interface 2015-07-09 11:34:40 +02:00
Martin Gräßlin 282321bfb5 [wayland] Announce support for idle interface 2015-07-09 10:10:58 +02:00
Martin Gräßlin 72635101f0 [wayland] Improve creation of KWayland::Server::PlasmaWindowInterface
The creation of PlasmaWindowInterface is moved from WaylandServer into
AbstractClient. This allows the sub classes to better control when to
create/destroy the Client.

For creation it's bound to becoming visible - that is Windows which are
only created but never shown are not announced at all.

For Client it's destroyed with the normal tear-down of a Client, for
ShellClient it's destroyed on unmapped (which also means a new one
will be created again in case of another mapping of the surface).

As a side effect, this works around the problem that ShellClients do not
yet get destroyed for QtWayland's menus (needs further investigation).
2015-07-09 09:10:33 +02:00
Martin Gräßlin f6458fa1e8 Port away from KToolInvocation
The problem with KToolInvocation is that it creates a dead lock on
Wayland in case kdeinit is not already running. It starts kdeinit
and does a QProcess::waitForFinished and our kdeinit needs to interact
with the wayland server. So dead lock.

As KRun also calls into the dangerous code path it's no option which
leaves us with QProcess to start the processes.

A nice side-effect is that we no don't need to link KF5::Service any
more from kwin_core. Now once Plasma and Notification don't use it
any more, it will be gone completely.
2015-07-07 17:35:57 +02:00
Martin Gräßlin da4305c2fa [wayland] Focus to null X11 window when activating a Wayland client
Improves interaction with Xwayland clients.
2015-07-07 16:15:58 +02:00
Martin Gräßlin 377988eae9 EffectsHandlerImpl::activateWindow operates on AbstractClient
And now PresentWindows finally activates and raises windows.
2015-07-07 16:12:27 +02:00
l10n daemon script 65ba0111fe 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-07-07 13:43:56 +00:00
Martin Gräßlin 316914a38b Change supported platforms of kglobalaccel plugin to "org.kde.kwin"
Overwrite the platform name through the environment variable and ensure
that the plugin is not picked in non-kwin Wayland sessions as that puts
kglobalaccel5 into a crash restart loop.

BUG: 349911
2015-07-07 13:36:27 +02:00
Martin Gräßlin a1a89d3d1e Disable Activities support on Wayland
This is a temporary workaround for bug 349992 which causes freezes
during startup as kwin and kamd dead lock each other on DBus.

To workaround we don't call Activities::create and check in every
usage of Activities::self() whether the pointer is valid.

As a result kwin_wayland now starts pretty fast.

CCBUG: 349992
2015-07-07 11:48:42 +02:00
Martin Gräßlin c31bb6d46f Drop KF5::Service dependency where it's no longer needed 2015-07-07 09:53:48 +02:00
Martin Gräßlin 06469f66a8 [aurorae] Port loading of QML decos to KPackage
Another sycoca usage gone.
2015-07-07 09:53:48 +02:00
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