Skip to content

Commit

Permalink
oops, left out the call to touch in bsetbg's create_tempfile\nhandle …
Browse files Browse the repository at this point in the history
…unknown single letter options in bsetbg\nhandle the reparentNotify event when the client is already unmapped
  • Loading branch information
shaleh committed Feb 11, 2002
1 parent 8eb652c commit 1898d25
Show file tree
Hide file tree
Showing 20 changed files with 1,594 additions and 1,524 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Changes from 0.62.1:
- bsetroot now sets _XROOTPMAP_ID, so pseudo transparent apps will be happy
- beginnings of a strut implementation. toolbar and slit are removed from
the available screen area
- bsetbg now tries to use tempfile, then mktemp and finally defaults to
creating a .$$ temporary file itself if none of the commands are found.
Also updated the command line argument parser to handler unknown single
letter arguments.
- handle the odd edge case where a reparent event occurs while the window
is unmapped. XReparentWindow sends an UnmapNotify to the window manager
however the window is already unmapped so the window manager never gets
the event and the unmapNotify event is where reparentNotify was handled.
Added a reparentNotifyEvent handler in the BlackboxWindow class and a new
case in the Blackbox class's process_event function.

Changes from 0.62.0 to 0.62.1:
- the lock modifier code handles user redefined modifiers better
Expand Down
4 changes: 2 additions & 2 deletions nls/C/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() for 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n
4 changes: 2 additions & 2 deletions nls/da_DK/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() for 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: s�tter 0x%lx til hovedvinduet\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: s�tter 0x%lx til 0x%lx\n
4 changes: 2 additions & 2 deletions nls/de_DE/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() von 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() von 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: 0x%lx nun Child des root window\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: 0x%lx nun Child des 0x%lx\n
10 changes: 5 additions & 5 deletions nls/es_ES/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
$ #Creating
# BlackboxWindow::BlackboxWindow: creando 0x%lx\n
$ #XGetWindowAttributesFail
# BlackboxWindow::BlackboxWindow: XGetWindowAttributres falt�\n
# BlackboxWindow::BlackboxWindow: XGetWindowAttributres fall�\n
$ #CannotFindScreen
# BlackboxWindow::BlackboxWindow: no pude encontrar la pantalla para la ventana \
fundamental 0x%lx\n
# BlackboxWindow::BlackboxWindow: no se puede encontrar la pantalla para la ventana \
ra�z 0x%lx\n
$ #Unnamed
# Sin nombre
$ #MapRequest
# BlackboxWindow::mapRequestEvent() para 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() para 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: padre nuevo para 0x%lx es la ra�z\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: el padre nuevo para 0x%lx es 0x%lx\n
4 changes: 2 additions & 2 deletions nls/et_EE/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() 0x%lx'le\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() 0x%lx'le\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: 0x%lx juurele\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: 0x%lx juurele 0x%lx\n
4 changes: 2 additions & 2 deletions nls/fr_FR/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() pour 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() pour 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: r�attribue 0x%lx � la fen�tre principale\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: r�attribue 0x%lx � la 0x%lx\n
4 changes: 2 additions & 2 deletions nls/it_IT/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() per 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() per 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx a root\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx a 0x%lx\n
4 changes: 2 additions & 2 deletions nls/ja_JP/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# BlackboxWindow::mapRequestEvent() (0x%lx ������)\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() (0x%lx ������)\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
$ #ReparentNotify
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to 0x%lx\n
4 changes: 2 additions & 2 deletions nls/nl_NL/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() voor 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() voor 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx naar root window\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx naar 0x%lx\n
4 changes: 2 additions & 2 deletions nls/pt_BR/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() para 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() para 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n
4 changes: 2 additions & 2 deletions nls/ru_RU/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() ��� 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() ��� 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n
4 changes: 2 additions & 2 deletions nls/sl_SI/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() za 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() za 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: ponovno priklju�eno 0x%lx korenskemu oknu\n
$ #ReparentNotify
# BlackboxWindow::unmapnotifyEvent: ponovno priklju�eno 0x%lx korenskemu oknu 0x%lx\n
4 changes: 2 additions & 2 deletions nls/sv_SE/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() f�r 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() f�r 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: 0x%lx till root\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: �terf�r 0x%lx till 0x%lx\n
4 changes: 2 additions & 2 deletions nls/tr_TR/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# 0x%lx i�in BlackboxWindow::mapRequestEvent()\n
$ #UnmapNotify
# 0x%lx i�in BlackboxWindow::unmapNotifyEvent()\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: 0x%lx'i ana pencereyi boya\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: 0x%lx'i ana pencereyi boya 0x%lx\n
4 changes: 2 additions & 2 deletions nls/zh_CN/Window.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# BlackboxWindow::mapRequestEvent() for 0x%lx\n
$ #UnmapNotify
# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n
$ #UnmapNotifyReparent
# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
$ #ReparentNotify
# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n
32 changes: 20 additions & 12 deletions src/Window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2251,18 +2251,10 @@ void BlackboxWindow::unmapNotifyEvent(XUnmapEvent *ue) {
XUnmapWindow(display, frame.window);
XUnmapWindow(display, client.window);

XEvent dummy;
if (! XCheckTypedWindowEvent(display, client.window, ReparentNotify,
&dummy)) {
#ifdef DEBUG
fprintf(stderr, i18n->getMessage(WindowSet, WindowUnmapNotifyReparent,
"BlackboxWindow::unmapNotifyEvent(): reparent 0x%lx to "
"root.\n"), client.window);
#endif // DEBUG

restoreGravity();
XReparentWindow(display, client.window, screen->getRootWindow(),
client.x, client.y);
XEvent ev;
if (! XCheckTypedWindowEvent(display, client.window, ReparentNotify,&ev)) {
// calls 'delete this' so we never get past the next line
reparentNotifyEvent(&(ev.xreparent));
}

XFlush(display);
Expand All @@ -2283,6 +2275,22 @@ void BlackboxWindow::destroyNotifyEvent(XDestroyWindowEvent *de) {
}


void BlackboxWindow::reparentNotifyEvent(XReparentEvent *re) {
if (re->window != client.window)
return;

#ifdef DEBUG
fprintf(stderr,
i18n->getMessage(WindowSet, WindowReparentNotify,
"BlackboxWindow::reparentNotifyEvent(): reparent 0x%lx to "
"0x%lx.\n"), client.window, re->parent);
#endif // DEBUG

restoreGravity();
delete this;
}


void BlackboxWindow::propertyNotifyEvent(Atom atom) {
blackbox->grab();
if (! validateClient()) return;
Expand Down
1 change: 1 addition & 0 deletions src/Window.hh
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ public:
void mapRequestEvent(XMapRequestEvent *);
void mapNotifyEvent(XMapEvent *);
void unmapNotifyEvent(XUnmapEvent *);
void reparentNotifyEvent(XReparentEvent *);
void propertyNotifyEvent(Atom);
void exposeEvent(XExposeEvent *);
void configureRequestEvent(XConfigureRequestEvent *);
Expand Down
Loading

0 comments on commit 1898d25

Please sign in to comment.