WM_IGNORE_FOCUS_EVENTS atom was added. Use new atom in orderwindow::: code added in last commit.

This commit is contained in:
Sergii Stoian 2019-04-03 19:13:30 +03:00
parent a6595e320d
commit 233c129a5c
2 changed files with 6 additions and 4 deletions

View file

@ -108,7 +108,8 @@ static char *atom_names[] = {
"_GNUSTEP_WM_MINIATURIZE_WINDOW",
"_GNUSTEP_WM_ATTR",
"_GNUSTEP_TITLEBAR_STATE",
"_GNUSTEP_FRAME_OFFSETS"
"_GNUSTEP_FRAME_OFFSETS",
"WM_IGNORE_FOCUS_EVENTS"
};
/*
@ -181,6 +182,7 @@ static char *atom_names[] = {
#define _GNUSTEP_WM_ATTR_ATOM atoms[64]
#define _GNUSTEP_TITLEBAR_STATE_ATOM atoms[65]
#define _GNUSTEP_FRAME_OFFSETS_ATOM atoms[66]
#define WM_IGNORE_FOCUS_EVENTS_ATOM atoms[67]
/*
* Frame offsets for window inside parent decoration window.

View file

@ -2821,15 +2821,15 @@ static BOOL didCreatePixmaps;
{
XEvent ev;
// Inform WM to ignore focus events
// Inform WindowMaker to ignore focus events
ev.xclient.type = ClientMessage;
ev.xclient.message_type = XInternAtom(dpy,"WM_IGNORE_FOCUS_EVENTS", False);
ev.xclient.message_type = generic.WM_IGNORE_FOCUS_EVENTS_ATOM;
ev.xclient.format = 32;
ev.xclient.data.l[0] = True;
XSendEvent(dpy, ROOT, True, EnterWindowMask, &ev);
// Display application icon
XMapWindow(dpy, ROOT);
// Inform WM to process focus events again
// Inform WindowMaker to process focus events again
ev.xclient.data.l[0] = False;
XSendEvent(dpy, ROOT, True, EnterWindowMask, &ev);
}