Delete pointless GRAB_SERVER_DURING_CONTEXT macro

Summary: One could just use XServerGrabber class directly.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24119
master
Vlad Zahorodnii 2019-09-19 22:19:02 +03:00
parent 5e71c2a608
commit 4c7dd52728
2 changed files with 1 additions and 5 deletions

View File

@ -56,7 +56,7 @@ Unmanaged::~Unmanaged()
bool Unmanaged::track(xcb_window_t w)
{
GRAB_SERVER_DURING_CONTEXT
XServerGrabber xserverGrabber;
Xcb::WindowAttributes attr(w);
Xcb::WindowGeometry geo(w);
if (attr.isNull() || attr->map_state != XCB_MAP_STATE_VIEWABLE) {

View File

@ -151,8 +151,6 @@ void KWIN_EXPORT ungrabXKeyboard();
* Small helper class which performs grabXServer in the ctor and
* ungrabXServer in the dtor. Use this class to ensure that grab and
* ungrab are matched.
*
* To simplify usage consider using the macro GRAB_SERVER_DURING_CONTEXT
*/
class XServerGrabber
{
@ -165,8 +163,6 @@ public:
}
};
#define GRAB_SERVER_DURING_CONTEXT XServerGrabber xserverGrabber;
// the docs say it's UrgencyHint, but it's often #defined as XUrgencyHint
#ifndef UrgencyHint
#define UrgencyHint XUrgencyHint