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:
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
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 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
If grabbed icons are blank, try to salvage the copied data as well as
possible while leaving setups where image grabbing works fine alone.
Based on a patch by Rakyn Barker.
BUG:355684
REVIEW: 126336
Hush the NetWinInfo deprecation warning
Hush the int narrowing warning
Create the container window on-screen
Switch to 32x32 pixel icons and avoid scaling
Made sure container window is under mouse upon click
Reviewed-by: David Edmundson
The goal of this project is to make xembed system trays available in
Plasma.
This is to allow legacy apps (xchat, pidgin, tuxguitar) etc. system
trays[1] available in Plasma which only supports StatusNotifierItem [2].
Ideally we also want this to work in an xwayland session, making X
system tray icons available even when plasmashell only has a wayland
connection.
REVIEW: 125655