aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-01-27 13:13:33 (GMT)
committerfluxgen <fluxgen>2002-01-27 13:13:33 (GMT)
commit76a38e466c84e2129794068d3196b0d1e61a2b4f (patch)
tree042126ac365912c877f32837bb076f1898c2429d
parent2652479b7cdf86a92617ef03f5bee0fc513f037b (diff)
downloadfluxbox_paul-76a38e466c84e2129794068d3196b0d1e61a2b4f.zip
fluxbox_paul-76a38e466c84e2129794068d3196b0d1e61a2b4f.tar.bz2
indentation and the frame.handle destroy
-rw-r--r--src/Window.cc46
1 files changed, 26 insertions, 20 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 9e422ae..c2f66e1 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.22 2002/01/20 02:14:20 fluxgen Exp $ 25// $Id: Window.cc,v 1.23 2002/01/27 13:13:33 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -458,11 +458,11 @@ FluxboxWindow::~FluxboxWindow(void) {
458 client.transient->client.transient_for = client.transient_for; 458 client.transient->client.transient_for = client.transient_for;
459 459
460 while ( !buttonlist.empty()) { //destroy all buttons on titlebar 460 while ( !buttonlist.empty()) { //destroy all buttons on titlebar
461 fluxbox->removeWindowSearch(buttonlist.back().win); 461 fluxbox->removeWindowSearch(buttonlist.back().win);
462 XDestroyWindow(display, buttonlist.back().win); 462 XDestroyWindow(display, buttonlist.back().win);
463 buttonlist.pop_back(); 463 buttonlist.pop_back();
464 } 464 }
465 465
466 if (frame.title) { 466 if (frame.title) {
467 if (frame.ftitle) 467 if (frame.ftitle)
468 image_ctrl->removeImage(frame.ftitle); 468 image_ctrl->removeImage(frame.ftitle);
@@ -495,12 +495,13 @@ FluxboxWindow::~FluxboxWindow(void) {
495 if (frame.ugrip) 495 if (frame.ugrip)
496 image_ctrl->removeImage(frame.ugrip); 496 image_ctrl->removeImage(frame.ugrip);
497 497
498 fluxbox->removeWindowSearch(frame.handle);
499 fluxbox->removeWindowSearch(frame.right_grip); 498 fluxbox->removeWindowSearch(frame.right_grip);
500 fluxbox->removeWindowSearch(frame.left_grip); 499 fluxbox->removeWindowSearch(frame.left_grip);
501 XDestroyWindow(display, frame.handle); 500 fluxbox->removeWindowSearch(frame.handle);
501
502 XDestroyWindow(display, frame.right_grip); 502 XDestroyWindow(display, frame.right_grip);
503 XDestroyWindow(display, frame.left_grip); 503 XDestroyWindow(display, frame.left_grip);
504 XDestroyWindow(display, frame.handle);
504 } 505 }
505 506
506 if (frame.fbutton) 507 if (frame.fbutton)
@@ -528,8 +529,9 @@ FluxboxWindow::~FluxboxWindow(void) {
528 screen->removeNetizen(client.window); 529 screen->removeNetizen(client.window);
529 } 530 }
530 531
531 #ifdef DEBUG 532
532 fprintf(stderr, "%s(%d): ~FluxboxWindow(this=%p) done\n", __FILE__, __LINE__, this); 533 #ifdef DEBUG
534 cerr<<__FILE__<<"("<<__LINE__<<"): ~FluxboxWindow(this="<<this<<") done"<<endl;
533 #endif 535 #endif
534} 536}
535 537
@@ -811,11 +813,11 @@ void FluxboxWindow::decorate(void) {
811 if (tmp) image_ctrl->removeImage(tmp); 813 if (tmp) image_ctrl->removeImage(tmp);
812 814
813 XSetWindowBorder(display, frame.handle, 815 XSetWindowBorder(display, frame.handle,
814 screen->getBorderColor()->getPixel()); 816 screen->getBorderColor()->getPixel());
815 XSetWindowBorder(display, frame.left_grip, 817 XSetWindowBorder(display, frame.left_grip,
816 screen->getBorderColor()->getPixel()); 818 screen->getBorderColor()->getPixel());
817 XSetWindowBorder(display, frame.right_grip, 819 XSetWindowBorder(display, frame.right_grip,
818 screen->getBorderColor()->getPixel()); 820 screen->getBorderColor()->getPixel());
819 } 821 }
820 822
821 XSetWindowBorder(display, frame.window, 823 XSetWindowBorder(display, frame.window,
@@ -1163,13 +1165,13 @@ void FluxboxWindow::positionWindows(void) {
1163 XSetWindowBorderWidth(display, frame.right_grip, screen->getBorderWidth()); 1165 XSetWindowBorderWidth(display, frame.right_grip, screen->getBorderWidth());
1164 1166
1165 XMoveResizeWindow(display, frame.handle, -screen->getBorderWidth(), 1167 XMoveResizeWindow(display, frame.handle, -screen->getBorderWidth(),
1166 frame.y_handle - screen->getBorderWidth(), 1168 frame.y_handle - screen->getBorderWidth(),
1167 frame.width, frame.handle_h); 1169 frame.width, frame.handle_h);
1168 XMoveResizeWindow(display, frame.left_grip, -screen->getBorderWidth(), 1170 XMoveResizeWindow(display, frame.left_grip, -screen->getBorderWidth(),
1169 -screen->getBorderWidth(), frame.grip_w, frame.grip_h); 1171 -screen->getBorderWidth(), frame.grip_w, frame.grip_h);
1170 XMoveResizeWindow(display, frame.right_grip, 1172 XMoveResizeWindow(display, frame.right_grip,
1171 frame.width - frame.grip_w - screen->getBorderWidth(), 1173 frame.width - frame.grip_w - screen->getBorderWidth(),
1172 -screen->getBorderWidth(), frame.grip_w, frame.grip_h); 1174 -screen->getBorderWidth(), frame.grip_w, frame.grip_h);
1173 XMapSubwindows(display, frame.handle); 1175 XMapSubwindows(display, frame.handle);
1174 } else if (frame.handle) 1176 } else if (frame.handle)
1175 XUnmapWindow(display, frame.handle); 1177 XUnmapWindow(display, frame.handle);
@@ -1757,7 +1759,7 @@ void FluxboxWindow::deiconify(bool reassoc, bool raise) {
1757 XSelectInput(display, client.window, NoEventMask); 1759 XSelectInput(display, client.window, NoEventMask);
1758 XMapWindow(display, client.window); 1760 XMapWindow(display, client.window);
1759 XSelectInput(display, client.window, 1761 XSelectInput(display, client.window,
1760 PropertyChangeMask | StructureNotifyMask | FocusChangeMask); 1762 PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
1761 1763
1762 XMapSubwindows(display, frame.window); 1764 XMapSubwindows(display, frame.window);
1763 XMapWindow(display, frame.window); 1765 XMapWindow(display, frame.window);
@@ -2582,7 +2584,11 @@ void FluxboxWindow::unmapNotifyEvent(XUnmapEvent *ue) {
2582 } 2584 }
2583} 2585}
2584 2586
2585 2587//----------- destroyNotifyEvent -------------
2588// Checks if event is for client.window.
2589// Unmaps frame.window and returns true for destroy
2590// of this FluxboxWindow else returns false.
2591//--------------------------------------------
2586bool FluxboxWindow::destroyNotifyEvent(XDestroyWindowEvent *de) { 2592bool FluxboxWindow::destroyNotifyEvent(XDestroyWindowEvent *de) {
2587 if (de->window == client.window) { 2593 if (de->window == client.window) {
2588 #ifdef DEBUG 2594 #ifdef DEBUG
@@ -3080,8 +3086,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) {
3080 } 3086 }
3081 } else if (functions.resize && 3087 } else if (functions.resize &&
3082 (((me->state & Button1Mask) && (me->window == frame.right_grip || 3088 (((me->state & Button1Mask) && (me->window == frame.right_grip ||
3083 me->window == frame.left_grip)) || 3089 me->window == frame.left_grip)) ||
3084 me->window == frame.window)) { 3090 me->window == frame.window)) {
3085 bool left = (me->window == frame.left_grip); 3091 bool left = (me->window == frame.left_grip);
3086 3092
3087 if (! resizing) { 3093 if (! resizing) {