Japanese translation of message catalog for Sawfish Window-Manager
Révision | 2a39e44375124dffde9d899594a9cccabded8ceb (tree) |
---|---|
l'heure | 1999-08-10 00:08:29 |
Auteur | john <john> |
Commiter | john |
some magic to make the w->reparenting work when called from
Fset_window_frame
@@ -349,19 +349,22 @@ reparent_notify (XEvent *ev) | ||
349 | 349 | { |
350 | 350 | Lisp_Window *w = find_window_by_id (ev->xreparent.window); |
351 | 351 | if (w != 0 && ev->xreparent.window == w->id) |
352 | - w->reparenting = FALSE; | |
352 | + w->reparenting--; | |
353 | 353 | } |
354 | 354 | |
355 | 355 | static void |
356 | 356 | map_notify (XEvent *ev) |
357 | 357 | { |
358 | 358 | Lisp_Window *w = find_window_by_id (ev->xmap.window); |
359 | - if (w != 0 && ev->xmap.window == w->id && !w->reparenting) | |
359 | + if (w != 0 && ev->xmap.window == w->id) | |
360 | 360 | { |
361 | - install_window_frame (w); | |
362 | 361 | w->mapped = TRUE; |
363 | - if (w->visible) | |
364 | - XMapWindow (dpy, w->frame); | |
362 | + if (!w->reparenting) | |
363 | + { | |
364 | + install_window_frame (w); | |
365 | + if (w->visible) | |
366 | + XMapWindow (dpy, w->frame); | |
367 | + } | |
365 | 368 | Fcall_window_hook (Qmap_notify_hook, rep_VAL(w), Qnil, Qnil); |
366 | 369 | } |
367 | 370 | } |
@@ -370,15 +373,18 @@ static void | ||
370 | 373 | unmap_notify (XEvent *ev) |
371 | 374 | { |
372 | 375 | Lisp_Window *w = find_window_by_id (ev->xunmap.window); |
373 | - if (w != 0 && ev->xunmap.window == w->id && !w->reparenting) | |
376 | + if (w != 0 && ev->xunmap.window == w->id) | |
374 | 377 | { |
375 | - w->mapped = FALSE; | |
376 | - if (w->visible) | |
377 | - XUnmapWindow (dpy, w->frame); | |
378 | - /* Removing the frame reparents the client window back to | |
379 | - the root. This means that we receive the next MapRequest | |
380 | - for the window. */ | |
381 | - remove_window_frame (w); | |
378 | + if (!w->reparenting) | |
379 | + { | |
380 | + w->mapped = FALSE; | |
381 | + if (w->visible) | |
382 | + XUnmapWindow (dpy, w->frame); | |
383 | + /* Removing the frame reparents the client window back to | |
384 | + the root. This means that we receive the next MapRequest | |
385 | + for the window. */ | |
386 | + remove_window_frame (w); | |
387 | + } | |
382 | 388 | Fcall_window_hook (Qunmap_notify_hook, rep_VAL(w), Qnil, Qnil); |
383 | 389 | } |
384 | 390 | } |
@@ -185,7 +185,7 @@ install_window_frame (Lisp_Window *w) | ||
185 | 185 | |
186 | 186 | XReparentWindow (dpy, w->id, w->frame, -w->frame_x, -w->frame_y); |
187 | 187 | w->reparented = TRUE; |
188 | - w->reparenting = TRUE; | |
188 | + w->reparenting++; | |
189 | 189 | DB((" reparented to %lx [%dx%d%+d%+d]\n", |
190 | 190 | w->frame, w->frame_width, w->frame_height, |
191 | 191 | w->frame_x, w->frame_y)); |
@@ -201,7 +201,7 @@ remove_window_frame (Lisp_Window *w) | ||
201 | 201 | /* reparent the subwindow back to the root window */ |
202 | 202 | XReparentWindow (dpy, w->id, root_window, w->attr.x, w->attr.y); |
203 | 203 | w->reparented = FALSE; |
204 | - w->reparenting = TRUE; | |
204 | + w->reparenting++; | |
205 | 205 | } |
206 | 206 | } |
207 | 207 |