hopefully fix some stuff with kde tray icons
This commit is contained in:
parent
2342c6224c
commit
a5451fa6fa
1 changed files with 22 additions and 13 deletions
|
@ -505,26 +505,35 @@ void frame_grab_client(ObFrame *self, ObClient *client)
|
||||||
void frame_release_client(ObFrame *self, ObClient *client)
|
void frame_release_client(ObFrame *self, ObClient *client)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
gboolean reparent = TRUE;
|
||||||
|
|
||||||
g_assert(self->client == client);
|
g_assert(self->client == client);
|
||||||
|
|
||||||
/* check if the app has already reparented its window away */
|
/* check if the app has already reparented its window away */
|
||||||
if (XCheckTypedWindowEvent(ob_display, client->window,
|
while (XCheckTypedWindowEvent(ob_display, client->window,
|
||||||
ReparentNotify, &ev)) {
|
ReparentNotify, &ev))
|
||||||
XPutBackEvent(ob_display, &ev);
|
{
|
||||||
|
/* This check makes sure we don't catch our own reparent action to
|
||||||
|
our frame window. This doesn't count as the app reparenting itself
|
||||||
|
away of course.
|
||||||
|
|
||||||
/* re-map the window since the unmanaging process unmaps it */
|
Reparent events that are generated by us are just discarded here.
|
||||||
|
They are of no consequence to us anyhow.
|
||||||
|
*/
|
||||||
|
if (ev.xreparent.parent != self->plate) {
|
||||||
|
reparent = FALSE;
|
||||||
|
XPutBackEvent(ob_display, &ev);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* XXX ... um no it doesnt it unmaps its parent, the window itself
|
if (reparent) {
|
||||||
retains its mapped state, no?! XXX
|
/* according to the ICCCM - if the client doesn't reparent itself,
|
||||||
XMapWindow(ob_display, client->window); */
|
then we will reparent the window to root for them */
|
||||||
} else {
|
XReparentWindow(ob_display, client->window,
|
||||||
/* according to the ICCCM - if the client doesn't reparent itself,
|
|
||||||
then we will reparent the window to root for them */
|
|
||||||
XReparentWindow(ob_display, client->window,
|
|
||||||
RootWindow(ob_display, ob_screen),
|
RootWindow(ob_display, ob_screen),
|
||||||
client->area.x,
|
client->area.x,
|
||||||
client->area.y);
|
client->area.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove all the windows for the frame from the window_map */
|
/* remove all the windows for the frame from the window_map */
|
||||||
|
|
Loading…
Reference in a new issue