The structure was only freed in case the XTest method was chosen.
But it should always be freed of course (as long as it isn't NULL).
Use a QScopedPointer instead to free it automatically when it goes out
of scope and to be more consistent with the rest of t
Differential Revision: https://phabricator.kde.org/D6389
Check the return value of xcb_get_window_attributes_reply() to prevent a crash if getting the window attributes would fail for some reason.
Also free the returned structure after usage to avoid memleaks.
This is necessary according to https://xcb.freedesktop.org/windowcontextandmanipulation (see the end of the page).
Differential Revision: https://phabricator.kde.org/D6252
Because of C++'s operator precedence, '!' logically negated
all_event_masks only instead of the whole expression.
This resulted in the condition always being false and XTest never being
used.
Adding a pair of brackets fixes it.
BUG: 362941
BUG: 375017
FIXED-IN: 5.10.1
Differential Revision: https://phabricator.kde.org/D6048
Summary:
Use the cmake variable rather than the library name to link.
This fixes linking on FreeBSD, where the library location is not
in the default linker path.
Reviewers: #freebsd, davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5997
Summary:
A certain toolkit doesn't register for mouse press release events
because it now uses XI2 only.
Injecting those directly to the window is too difficult, fortunately in
the GTK3 case we can use XTest to send an event. Something I had
previously chosen against using because it didn't work with something
else (can't remember what). I now have a bit of code choosing which
method to use, which will hopefully cover all cases.
Code is a bit convuluted because the xcb version of xtest doesn't have
the high-level method I want to use in it's API, so I just used Xlib
version.
CCBUG: 375017
CCBUG: 362941
Test Plan:
Ran my usual bunch of test apps:
- xchat
- a GTK3 systray demo I made
- skype (A Qt4 app without SNI patches)
All worked as before
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5156
Summary:
Reduces code duplication and we always opperate on cached value, that
is the platform is only checked once in application life cycle.
Reviewers: #plasma, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2342
QHash::[] inserts a value whereas QHash::value() doesn't.
Avoid using it in an event filter.
This fixes docking, undocking and redocking the same wID multiple times
if it creates damage events in the interim.
1a13806d74 changed from configure to
config_notify which fixed some applications, however also broke other
applications such as radiotray and pidgin not appearing.
This patch sends both types of resize, so that one should work.
The tray window itself may be destroyed before we start monitor the
event of it. Check the returned error and skip this window if BadWindow
happens.
FIXED-IN: 5.6.0
BUG: 358719
REVIEW: 127014
The selection manager of tray may hold a property to indicate the tray
icon window visual. Try to use the visual with alpha channel when
composite is enabled.
REVIEW: 127009
Coverity noted we were mismatching new Foo with free(foo), which is
undefined behavior (CID 1340556). While I was fixing that I noticed we
have the same issue with QScopedPointer<>: when using QSP to track
objects returned by libxcb, we must use free() to release memory, not
C++ delete. (e.g. see
http://xcb.freedesktop.org/manual/group__XCB____API.html#ga6727f2bfb24769655e52d1f1c50f58fe)
QScopedPointer will do this if we use QScopedPointerPodDeleter.
REVIEW:126512