15473 Commits (ddf3536f19a4243670e5fc87f5fbaf9e44031542)
 

Author SHA1 Message Date
Martin Flöser ddf3536f19 Drop Client::cap_deco as it's nowhere used
Summary:
cap_deco was only used in the caption with stripped arg case which was
unused and thus removed. Now cap_deco is completely unused.

Due to that we can also remove the stripped client script which only
manipulated the cap_deco.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7077
7 years ago
Martin Flöser 00281711d9 Handle processId being 0 in ShellClient::killWindow
Summary:
If ClientConnection fails to get the process id (which happens at least
on FreeBSD) the process id is 0. We should not try to terminate this pid
as it terminates all processes is KWin's process group which is the whole
session.

Test Plan: Only compile test

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7168
7 years ago
l10n daemon script 004a9aa6ea 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"
7 years ago
Martin Flöser 20e314d151 Properly render XWayland windows in SceneQPainter
Summary:
The buffer for a XWayland window is larger than the actual size. Thus
we need to use the clientSize as reference, not the buffer size.

BUG: 382748

Test Plan: Test passes

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6952
7 years ago
Martin Flöser afd52c188a Drop the stripped parameter from AbstractClient::caption
Summary:
The parameter is not used anywhere in KWin. Only the default value was
used. So let's drop this.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7059
7 years ago
Martin Flöser 4a0787c058 Process all clients when updating fullscreen for active client
Summary:
Currently only done for X11 clients, should also be done for Wayland
client.s

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6892
7 years ago
Martin Gräßlin 9bdc7b7d4b Do not move temporary objects
It prevents copy elision according to Clang and of course clang is
right.
7 years ago
Martin Gräßlin f15ceaffe6 Drop unused variable UdevMonitor::m_udev
Credits to clang for finding unused private fields.
7 years ago
Martin Gräßlin bca8777acd Drop unused SceneXrender::Window::alpha_cached_opacity
Credits to clang for finding unused private field.
7 years ago
Martin Gräßlin 2858e30882 Drop unused static variables in client.cpp
Credits to clang for finding those.
7 years ago
Martin Gräßlin e713df1886 [plugins/qpa] Drop unused variable AbstractPlatformContext::m_integration
Credits to clang for finding unused private variable. This allowed to
similify the ctor and remove a const_cast.
7 years ago
Martin Gräßlin f5845fec02 [plugins/qpa] Properly ifdef everything with HAVE_WAYLAND_EGL
Hide variables which are only used with wayland egl and mark attributes
as unused if they are not used without having wayland egl.
7 years ago
Martin Gräßlin b3a52e3999 [autotests] Drop PlasmaSurfaceTest::m_connection
Credits to clang for finding unused private variable.
7 years ago
Martin Gräßlin 063e796b18 [effects/backgroundcontrast] Remove ContrastShader::pixelSizeLocation
Credits to clang for finding an unused private variable.
7 years ago
Martin Gräßlin 3f238470c8 [effects/wobblywindows] Move computeVectorBounds into ifdef section
Fixes unused function warning with clang.
7 years ago
Martin Gräßlin 8b2b11196b [kcmkwin/desktop] Use KAboutData::programLogo instead of programIconName
ProgramIconName is deprecated and what we want to achieve is actually
provided by programLogo.
7 years ago
Martin Gräßlin ca84a81e0d Check for include file before configuring config-kwin.h 7 years ago
David Edmundson 0809a357c1 Improve testWindowScaled test
Summary:
Comparing a pure blue square isn't a very effective test as someone
cropping the image will still pass.

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6982
7 years ago
Martin Gräßlin bc003c0228 Add cmake check whether sys/sysmacros.h exists
Unfortunately 9ada8baca6 failed to compile
on FreeBSD due to the header not existing. So we need to check the
existance and properly guard with ifdef.
7 years ago
Martin Gräßlin 9ada8baca6 Turn around include order for major/minor
Although we made KWin compile with newer include requirement for major
and minor in gnu libc, we still get the warning that it's deprecated.
So let's try to turn the include order around. That should fix the
warning and hopefully still compile on non gnu libc (e.g. FreeBsd). If
it fails, we need to add a cmakedefine for the header.
7 years ago
Martin Flöser acedee21a5 [qpa] Fix overloaded-virtual warning 7 years ago
l10n daemon script ec11cfd04f 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"
7 years ago
Martin Flöser 31e4387852 [platforms/x11] Silence warning caused by eglCreateImageKHR taking an xpixmap for a pointer
Nothing we can do, the API sucks. So just silence warning.
7 years ago
Martin Flöser 859709f10a [libinput] Fix enumeral and non-enumeral type in conditional expression warning 7 years ago
Martin Flöser 656b3c2db5 [libinput] Fix reorder warnings 7 years ago
Martin Flöser 3eb3e64d91 [platforms/x11] Fix int-in-bool-context warning
The intention is to prevent division by zero, so make this explicit by
comparing the values against 0.
7 years ago
Martin Flöser f47cc62180 Fix unuxed-but-set-variable warning 7 years ago
Martin Flöser 1447f4641c [autotests] Fix unused function warnings
The functions are defined in a common header but not used in all tests.
This creates needless warning noise, so hide them through an ifdef.
7 years ago
Martin Flöser 349618c214 Move bitCount from utils to GlxBackend
Only used in GlxBackend.

Differential Revision: https://phabricator.kde.org/D6784
7 years ago
Martin Flöser da036098cf Nullptr check for rootInfo when setting active client
Summary:
Preparation for X free KWin. Code is called for both X11 and Wayland
windows. So make it not crash if we would not have an X server.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6908
7 years ago
Martin Flöser 150a0357b4 Replace delegate slots for window shortcut by std::bind expressions
Summary:
Client had a slot to delay a call when setting up a global shortcut for
the Client. This can be simplified by using a std::bind expression.
Similar the action was connected to a one line lambda which can be
expressed through a std::bind expression as well.

Test Plan: New added auto test still passes

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6801
7 years ago
Martin Flöser c8c15f0057 Use std::bind expression for Workspace::slotWindowtoDesktop
Summary:
This way we don't need the sender() hack to get the value set on the
QAction.

Test Plan: New autotest in master still passes

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6811
7 years ago
Martin Flöser 7d3517060f Drop the Workspace::slotSwitchWindowFoo methods
Summary:
They were only delegating into switchWindow(Direction), so let's do the
same through std::bind in kwinbindings and delegate to it directly in
scripting's WorkspaceWrapper.

Test Plan: Not yet, want to add test case for Workspace::switchWindow

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6791
7 years ago
Martin Flöser 64da6c8d1e Replace Workspace::slotWindowQuickTileFoo by a quickTileWindow with argument
Summary:
Thanks to std::bind we don't need that many different slots to setup the
global shortcut connections. Instead we can have one shared
implementation which takes the argument and passes it to the window.

To support std::bind arguments in kwinbindings the initShortcut method
and dependencies are adjusted as well as a new macro is added.

As I don't want to include abstract_client.h in workspace.h a new enum
is created for the quick tiling flags used in Workspace. This caused a
larger refactoring as the change to an enum class also caused quite some
changes.

Test Plan: Affected test cases still pass

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6783
7 years ago
l10n daemon script f14540485f 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"
7 years ago
Martin Flöser 8527ac30dc Fix unused-parameter warnings as reported by GCC 7 years ago
Martin Flöser e8a92361ae [autotests] Perform complete QImage comparison in SceneQPainterTest::testX11Window
As pixel comparison is failing, let's just compare the image against a
reference image.
7 years ago
Martin Flöser 06433997e8 Emit connectionDied on all Wayland connections of plugins on teardown
Summary:
Some libraries loaded into KWin (e.g. breeze) also have a Wayland
connection. If KWin destroyes it's own Wayland connection before the
libraries destroy theirs, KWin might crash on tear down when the
libraries call into libwayland with an invalid connection.

This change requires D6569 in KWayland.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6571
7 years ago
David Edmundson 777f7009ed Merge branch 'Plasma/5.10' 7 years ago
David Edmundson 308ab76428 Update KNS providers to https
CCBUG: 382820
7 years ago
Martin Flöser 719d09d0cd -Wno-inconsistent-missing-override on Clang
This is a totally stupid warning for an older code base such as KWin. It
generates hundreds of warnings as on legacy code no method uses override.
The output is totally spammed, so it's better to disable it.

This will hopefully also prevent that someone tries to fix it again by
changing all of KWin - which we don't want.
7 years ago
Martin Flöser f6c964a32b [autotests] Another change for SceneQPainterTest::testX11Window to make it pass CI
Still missing ideas, theory is that rendering on Xwayland is too slow and
we have an invalid buffer or that reparenting took to long.
7 years ago
Martin Flöser eee2ace6a1 Make Q_FALLTHROUGH code compile with Qt < 5.8
sorry for breaking FreeBSD CI build. I didn't expect Q_FALLTHROUGH being
newer.
7 years ago
Martin Flöser a13ecb1cac [autotests] Try to make SceneQPainterTest::testX11Window more robust
Still failing on CI, let's try  to verify that the buffer is ready.
7 years ago
Martin Flöser 4b89011099 Fix (incorrect) implicit-fallthrough warnings in gcc7
All cases are annotated that it's an explicit fallthrough, so add
Q_FALLTHROUGH to silence the warning.
7 years ago
Martin Flöser d39fea1b67 [autotests] Try to make SceneQPainterTest::testX11Window more robust
It fails on build.kde.org which might be a side effect.
7 years ago
Martin Flöser 54ca2bba25 [autotests] Add test case for incorrect rendering of XWayland on SceneQPainter
CCBUG: 382748
7 years ago
l10n daemon script ccc69e8105 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"
7 years ago
Martin Flöser 1557f102f4 [autotests] Add test cases for verifying that Toplevel::window() is only set for X11
Also at the same time verifies that root info active client is only
set on X11.
7 years ago
Andreas Sturmlechner 35c278e525 Fix build with future glibc (major/minor macros), BSD compatible
Summary:
Also adding sys/types.h which is not implicitly included from all over.

Thanks-to: [ade] in #kde-devel

See also:
https://sourceware.org/ml/libc-alpha/2015-11/msg00452.html
https://git.reviewboard.kde.org/r/127662/

BUG: 376505

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin, #kwin, adridg

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6175
7 years ago