aboutsummaryrefslogtreecommitdiff
path: root/src/Window.hh
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-10-15 06:31:10 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-10-15 06:31:10 (GMT)
commit3441261346fcee4efb6ba27764384d141b2c4f7e (patch)
treea7adb9a72878e94df9a90247caf184cc7d9794fd /src/Window.hh
parent9bd64010135e26f97fa4d4d551737847fedfbcdd (diff)
downloadfluxbox_pavel-3441261346fcee4efb6ba27764384d141b2c4f7e.zip
fluxbox_pavel-3441261346fcee4efb6ba27764384d141b2c4f7e.tar.bz2
don't allow resizing to negative dimensions
this fixes a problem when the user resizes a window over the opposite border. as a result a signed overflow occured which lead to quite huge windows.
Diffstat (limited to 'src/Window.hh')
-rw-r--r--src/Window.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Window.hh b/src/Window.hh
index 97ece55..bf177b4 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -507,7 +507,7 @@ private:
507 // modifies left and top if snap is necessary 507 // modifies left and top if snap is necessary
508 void doSnapping(int &left, int &top); 508 void doSnapping(int &left, int &top);
509 // user_w/h return the values that should be shown to the user 509 // user_w/h return the values that should be shown to the user
510 void fixsize(); 510 void fixSize();
511 void moveResizeClient(WinClient &client); 511 void moveResizeClient(WinClient &client);
512 /// sends configurenotify to all clients 512 /// sends configurenotify to all clients
513 void sendConfigureNotify(); 513 void sendConfigureNotify();
@@ -547,7 +547,7 @@ private:
547 int m_button_grab_x, m_button_grab_y; // handles last button press event for move 547 int m_button_grab_x, m_button_grab_y; // handles last button press event for move
548 int m_last_resize_x, m_last_resize_y; // handles last button press event for resize 548 int m_last_resize_x, m_last_resize_y; // handles last button press event for resize
549 int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving 549 int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving
550 unsigned int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window" 550 int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window"
551 551
552 timeval m_last_keypress_time; 552 timeval m_last_keypress_time;
553 553
@@ -562,16 +562,16 @@ private:
562 Client2ButtonMap m_labelbuttons; 562 Client2ButtonMap m_labelbuttons;
563 563
564 SizeHints m_size_hint; 564 SizeHints m_size_hint;
565 struct _decorations { 565 struct {
566 bool titlebar, handle, border, iconify, 566 bool titlebar:1, handle:1, border:1, iconify:1,
567 maximize, close, menu, sticky, shade, tab, enabled; 567 maximize:1, close:1, menu:1, sticky:1, shade:1, tab:1, enabled:1;
568 } decorations; 568 } decorations;
569 569
570 std::vector<WinButton::Type> m_titlebar_buttons[2]; 570 std::vector<WinButton::Type> m_titlebar_buttons[2];
571 bool m_toggled_decos; 571 bool m_toggled_decos;
572 572
573 struct _functions { 573 struct {
574 bool resize, move, iconify, maximize, close, tabable; 574 bool resize:1, move:1, iconify:1, maximize:1, close:1, tabable:1;
575 } functions; 575 } functions;
576 576
577 typedef FbTk::ConstObjectAccessor<bool, FocusControl> BoolAcc; 577 typedef FbTk::ConstObjectAccessor<bool, FocusControl> BoolAcc;