Commit graph

15661 commits

Author SHA1 Message Date
Alexander Potashev
e033091f41 kcmkwinrules: Fix window title 2017-10-15 18:36:38 +03:00
Alexander Potashev
348ad276ac kcmkwinrules: Change file filter to "KWin Rules (*.kwinrule)" 2017-10-15 18:36:38 +03:00
Martin Flöser
afe0a5c041 Fix placement of KSplash
Summary:
In a bug report there was a reference that on multi-screen KSplash is
not placed correctly. I investigated and noticed that it is an OSD which
sets an own position. In KWin the events were processed correctly but
the position was off.

The problem is that KWin has code to correct the position of an OSD when
it's size changes. This happens also on first damage and then the window
gets incorrectly placed when the position is set. So honor that the
position is set.

Test Plan: Restarted the session, ksplash positioned correctly now.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8268
2017-10-15 16:41:31 +02:00
Martin Flöser
1e7b4fbc8a Merge branch 'Plasma/5.11' 2017-10-15 16:40:03 +02:00
Martin Flöser
1b01f1b300 Update pointer position whenever a window gets (un)minimized
Summary:
This fixes the following problem:
1. Have two windows maximized
2. Click minimize button on first window
3. Click minimize button on second window

What happened:
Second click was ignored as the pointer was not updated.

BUG: 378704
FIXED-IN: 5.11

Test Plan:
Nested KWin/Wayland, added two maximized windows, minimized
both without moving the mouse

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8145
2017-10-15 16:38:45 +02:00
l10n daemon script
af82ddb508 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"
2017-10-14 07:20:40 +02:00
l10n daemon script
eedd89fd51 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"
2017-10-14 05:33:32 +02:00
Marco Martin
735fcc6e95 Make use of foreign protocol
Summary:
not sure if that is the right "parent" that has
to be set, set the transient for surfaces that
have setParentOf of an imported set

Test Plan:
m_XdgForeign->transientFor(surface()) finds the surface is expected,
not sure how to test it further

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: luebking, graesslin, davidedmundson, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7521
2017-10-13 11:32:22 +02:00
l10n daemon script
c409c9c3f0 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"
2017-10-13 06:29:01 +02:00
l10n daemon script
696028bdb2 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"
2017-10-13 05:05:58 +02:00
Alexander Potashev
4b072568bf kwinscripts: change i18n string "Get New Scripts..."
One may install several scripts.
2017-10-12 16:46:43 +03:00
David Edmundson
f920b860c2 Merge branch 'Plasma/5.11' 2017-10-12 10:39:20 +02:00
David Edmundson
5bca058826 Fix DRM EGL crash regression
Summary:
In 47343fb we made GBM buffer shared.

What we wanted to do was:
Unbox the shared_pointer<GBMSurface> to give us a GBMSurface* object
Call the gbm_surface*() on that operator
Then cast that to a void* for eglCreatePlatformWindowSurfaceEXT

What we did:
Cast the std::shared_ptr<GBMSurface> to a gbm_surface*  then cast that
to void*.
This is just a garbage value and it crashes in Mesa when we do our first
paint.

I've replaced that with an explicit method then we can use shared_ptr's
-> operator rather than get() which does the right thing in a readable
way.

Test Plan:
It crashed after rebasing to master (for Aleix too)
No longer crashes

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8251
2017-10-12 10:12:24 +02:00
David Edmundson
3d619c995b Fix DRM EGL crash regression
Summary:
In 47343fb we made GBM buffer shared.

What we wanted to do was:
Unbox the shared_pointer<GBMSurface> to give us a GBMSurface* object
Call the gbm_surface*() on that operator
Then cast that to a void* for eglCreatePlatformWindowSurfaceEXT

What we did:
Cast the std::shared_ptr<GBMSurface> to a gbm_surface*  then cast that
to void*.
This is just a garbage value and it crashes in Mesa when we do our first
paint.

I've replaced that with an explicit method then we can use shared_ptr's
-> operator rather than get() which does the right thing in a readable
way.

Test Plan:
It crashed after rebasing to master (for Aleix too)
No longer crashes

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8251
2017-10-11 20:04:13 +02:00
Martin Flöser
031e1f323f Merge branch 'Plasma/5.11' 2017-10-11 18:32:32 +02:00
Martin Flöser
d6a906da92 [autotests] Fix typo 2017-10-11 18:31:43 +02:00
Martin Flöser
f448691f54 Correct installation of kwin_wayland when DESTDIR and libcap are used together
Based on patch for kinit: D8064.
2017-10-10 19:54:07 +02:00
Martin Flöser
c2f5b3e5b1 Merge branch 'Plasma/5.11' 2017-10-09 21:04:41 +02:00
Martin Flöser
35bcc9fc35 Port RuleBook::discardUsed from Client to AbstractClient
Summary: Prepares the Rules update on reconfigure for Wayland windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8094
2017-10-07 08:07:24 +02:00
Martin Flöser
0372fdaf92 Move WindowRules from Client to AbstractClient
Summary:
So far window rule specific functionality was only implemented in Client
and in ShellClient there was only a dummy implementation. This change
moves the client_rules member variable from Client to AbstractClient.
Areas which would not compile anymore are adjusted.

This is a first step to get window rule support for Wayland windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8090
2017-10-07 07:42:41 +02:00
l10n daemon script
07d1cb1191 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"
2017-10-07 05:16:28 +02:00
l10n daemon script
9919dfa161 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"
2017-10-06 05:07:46 +02:00
Martin Flöser
47343fb8f7 [platforms/drm] Use a shared pointer for gbm_surface
Summary:
The gbm_surface is owned by the EglGbmBackend, but it's not the only one
using it. The DrmSurfaceBuffer is also using it and needs it to destroy
the gbm_bo. Now this can become a problem in the following situation:

* a page flip is still pending
* the EglGbmBackend destroys the gbm_surface

-> when the page flip happens the DrmSurfaceBuffer will try to destroy
the gbm_bo and crash as the gbm_surface is no longer valid. This
situation can happen when switching screens or when switching compositing
backend (OpenGL 2 -> OpenGL 3).

To address this problem a class GbmSurface is added which wrapps the
gbm_surface pointer. The EglGbmBackend creates and holds a shared pointer
to the GbmSurface and passes that one to the DrmSurfaceBuffer. So when
cleaning up the gbm_surface only the shared pointer is reset and in case
the DrmSurfaceBuffer still needs it, it can access it without problems.

BUG: 385372
FIXED-IN: 5.11.0

Test Plan: Not yet

Reviewers: #kwin, #plasma, subdiff

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8152
2017-10-05 21:32:46 +02:00
Martin Flöser
31b5b7f9f9 Ensure internal Wayland connection is properly setup before creating LockScreen integration
With the new Wayland only mode we start too fast and it can happen that
the initWithWorkspace is called before the client connection is fully
setup. This would result in a crash in the idletime plugin once it tries
to create a seat.

To prevent this problem the code is split out into a dedicated method
and only invoked if all interfaces have been announced on the internal
connection.

BUG: 385397
FIXED-IN: 5.11.1
2017-10-05 19:34:53 +02:00
Jonathan Riddell
c27f6dcde1 Update version number for 5.11.0
GIT_SILENT
2017-10-05 13:07:17 +01:00
l10n daemon script
0032609f21 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"
2017-10-05 06:47:00 +02:00
l10n daemon script
e85c3f386f 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"
2017-10-05 05:15:58 +02:00
Martin Flöser
65fcde7426 Honor DESTDIR env variable in setcap command 2017-10-04 18:33:55 +02:00
David Edmundson
269ec5bbce Merge branch 'Plasma/5.11' 2017-10-04 10:13:37 +01:00
Hartmut Goebel
5e7b3c6c73 Fix: Missing dependencies for kwin autotests
guix (like nix) used a separate prefix for each package. Thus the header
files for
qtdeclarative are in /gnu/store/…-qtdeclarative-5.9.1/include/qt5/ while
the ones for
qtbase are in /gnu/store/…-base-5.9.1/include/qt5/. This means that
*each* dependency's include directory must be specified. This is in
contrast to a "normal" Unix-system, where all includes end up in
/usr/include/qt5 and missing to defined some include-dependencies does
often not raise an error.

Differential Revision: https://phabricator.kde.org/D8112
2017-10-04 10:12:06 +01:00
Martin Flöser
c359fc076d [platforms/virtual] Always link SceneOpenGLBackend
Egl support is not optional in virtual platform, so always compile it in.

BUG: 385301
2017-10-03 19:19:35 +02:00
David Edmundson
b2f1e538d5 Merge branch 'Plasma/5.11' 2017-10-02 09:14:43 +01:00
David Edmundson
7c538207f4 remove xdgv6 use from 5.11 branch 2017-10-02 08:49:37 +01:00
l10n daemon script
e1e9f9cf72 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"
2017-10-02 05:07:43 +02:00
Martin Flöser
f988a5f654 Reload VirtualDesktop settings after passing RootInfo on VirtualDesktopManager
Summary:
The load method and updateLayout ensure the virtual desktop information
is synced to RootInfo and thus to other X11 applications. Thus we need
to call it again when initing X11.

BUG: 385260

Test Plan: Not tested as I'm on Wayland, but given the changes it's obvious.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8086
2017-10-01 21:56:39 +02:00
Martin Flöser
371ad57abd Drop ifdef'ed debug code from layers.cpp
It's confusing to search for usages of ClientList::Iterator and then
discover it's all just commented out. Before falling another time over
it: let's remove it.
2017-10-01 21:52:56 +02:00
Martin Flöser
252980390d Merge branch 'Plasma/5.11' 2017-10-01 15:26:40 +02:00
Martin Flöser
0d96e60b79 Also send Wayland clients to a new desktop if their desktop was removed
Summary:
So far the method only operated on X11 clients. So when the last desktop
got removed Wayland clients were still on it. As the auto test showed:
this results in a crash.

Credits go to code coverage as it showed that area as red, which made me
look on it and realize this must be broken.

Test Plan: New test case added

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8082
2017-10-01 11:04:05 +02:00
Martin Flöser
f31e183605 [libkwineffects] Try fixing compile error with clang
The FreeBSD build is currently failing with:

kwingltexture_p.h:83:23: error: no function named 'cleanupGL' with type
'void ()' was found in the specified scope
friend void KWin::cleanupGL();

This change hopefully addresses the problem.
2017-10-01 09:54:12 +02:00
Martin Flöser
793eecc826 Fix compile warnings after removing ObscurringWindows 2017-10-01 09:51:09 +02:00
Martin Flöser
d75e5c63d4 Ensure Workspace is only started once in Wayland-only mode
The connect to Compositor::sceneCreated must be disconnected again,
otherwise a restart of the Compositor results in Workspace being created
again.

Thanks to our autotests for finding this problem!
2017-10-01 09:06:51 +02:00
l10n daemon script
f0445b20e2 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"
2017-10-01 05:17:39 +02:00
Martin Flöser
2fb5a5fb9f [autotests] Support Wayland Only in addition to XWayland
The integrationTest function takes a new optional argument whether the
test supports a Wayland Only mode. If that's the case the test is
compiled twice, once (as always) as "foo" with XWayland support and
once as "foo_waylandonly" without XWayland support.

This way we can ensure that our code always supports both modes. The
tests found multiple issues. At the moment fast running tests are
sporadically crashing on tear down. This needs further investigation.
2017-09-30 16:35:52 +02:00
Martin Flöser
4c334098f3 Ensure internal Wayland connection is properly setup before creating LockScreen integration
With the new Wayland only mode we start too fast and it can happen that
the initWithWorkspace is called before the client connection is fully
setup. This would result in a crash in the idletime plugin once it tries
to create a seat.

To prevent this problem the code is split out into a dedicated method
and only invoked if all interfaces have been announced on the internal
connection.
2017-09-30 16:33:45 +02:00
Martin Flöser
3ce9a4a179 [tabbox] Guard Xcb::sync with whether we have an X11 connection
Otherwise crash on WaylandOnly once you Alt+Tab. Credits go to our
integration tests for finding this issue!
2017-09-30 16:29:42 +02:00
Martin Flöser
a74f8766c3 Drop OperationModeX11AndWayland and introduce OperationModeWaylandOnly instead
The operation mode X11 and Wayland is no longer supported and probably
hasn't been supported for the last few years. But now there is the
possibility to run Wayland only, so introduce this as a dedicated new
OperationMode.
2017-09-30 15:09:06 +02:00
Martin Flöser
0c8c047d78 Don't crash on tear-down of Workspace if run without X11 support
Much easier than expected.
2017-09-30 13:31:14 +02:00
Martin Flöser
8ae37c420b Move SceneOpenGL into a dedicated plugin
Summary:
Unfortunately a rather large change which required more refactoring than
initially expected. The main problem was that some parts needed to go
into platformsupport so that the platform plugins can link them. Due to
the rather monolithic nature of scene_opengl.h a few changes were
required:
* SceneOpenGL::Texture -> SceneOpenGLTexture
* SceneOpenGL::TexturePrivate -> SceneOpenGLTexturePrivate
* texture based code into dedicated files
* SwapProfiler code into dedicated files
* SwapProfiler only used in x11 variants
* Safety checks for OpenGL scene moved into the new plugin
* signal declared in SceneOpenGL moved to Scene, so that we don't need
to include SceneOpenGL in composite

Test Plan: Nested OpenGL compositor works

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7740
2017-09-30 13:12:10 +02:00
Martin Flöser
343d8c9b62 Support starting kwin_wayland without XWayland support
Summary:
Just continues with the steps without starting XWayland.

This does not yet fully support kwin_wayland without X11, it currently
still crashes on teardown.

Test Plan: kwin_wayland --socket=wayland-1 kwrite (note the missing --xwayland)

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7924
2017-09-30 13:04:08 +02:00
Martin Flöser
5cbd28f9a0 Move X11 specific Workspace initialization code into dedicated method
Summary:
This is required to start KWin/Wayland without XWayland support or
delayed XWayland support.

Test Plan: Run kwin_x11 in a nested Xephyr

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7897
2017-09-30 13:03:52 +02:00