mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
replace hardcoded values with definitions in qt_x_errhandler()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ecfe9ce549
commit
1f29af4ca8
2 changed files with 5 additions and 4 deletions
|
@ -406,7 +406,7 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
|
||||||
|
|
||||||
switch (err->error_code) {
|
switch (err->error_code) {
|
||||||
case BadAtom:
|
case BadAtom:
|
||||||
if (err->request_code == 20 /* X_GetProperty */
|
if (err->request_code == X_GetProperty
|
||||||
&& (err->resourceid == XA_RESOURCE_MANAGER
|
&& (err->resourceid == XA_RESOURCE_MANAGER
|
||||||
|| err->resourceid == XA_RGB_DEFAULT_MAP
|
|| err->resourceid == XA_RGB_DEFAULT_MAP
|
||||||
|| err->resourceid == ATOM(_NET_SUPPORTED)
|
|| err->resourceid == ATOM(_NET_SUPPORTED)
|
||||||
|
@ -419,8 +419,8 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BadWindow:
|
case BadWindow:
|
||||||
if (err->request_code == 2 /* X_ChangeWindowAttributes */
|
if (err->request_code == X_ChangeWindowAttributes
|
||||||
|| err->request_code == 38 /* X_QueryPointer */) {
|
|| err->request_code == X_QueryPointer) {
|
||||||
for (int i = 0; i < ScreenCount(dpy); ++i) {
|
for (int i = 0; i < ScreenCount(dpy); ++i) {
|
||||||
if (err->resourceid == RootWindow(dpy, i)) {
|
if (err->resourceid == RootWindow(dpy, i)) {
|
||||||
// Perhaps we're running under SECURITY reduction? :/
|
// Perhaps we're running under SECURITY reduction? :/
|
||||||
|
@ -429,7 +429,7 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qt_x11Data->seen_badwindow = true;
|
qt_x11Data->seen_badwindow = true;
|
||||||
if (err->request_code == 25 /* X_SendEvent */) {
|
if (err->request_code == X_SendEvent) {
|
||||||
for (int i = 0; i < ScreenCount(dpy); ++i) {
|
for (int i = 0; i < ScreenCount(dpy); ++i) {
|
||||||
if (err->resourceid == RootWindow(dpy, i)) {
|
if (err->resourceid == RootWindow(dpy, i)) {
|
||||||
// Perhaps we're running under SECURITY reduction? :/
|
// Perhaps we're running under SECURITY reduction? :/
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
#include <X11/Xproto.h>
|
||||||
|
|
||||||
#define XK_MISCELLANY
|
#define XK_MISCELLANY
|
||||||
#define XK_LATIN1
|
#define XK_LATIN1
|
||||||
|
|
Loading…
Add table
Reference in a new issue