From fe9b1efde5e46c00679d0435601f915099a574b0 Mon Sep 17 00:00:00 2001 From: Scott Moynes Date: Tue, 16 Apr 2002 22:50:18 +0000 Subject: [PATCH] fixed snap to edges with toolbar hidden --- src/Toolbar.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Toolbar.h b/src/Toolbar.h index 47a9dd2c..bb4b86ff 100644 --- a/src/Toolbar.h +++ b/src/Toolbar.h @@ -27,6 +27,7 @@ #include "Basemenu.h" #include "Timer.h" +#include "Screen.h" // forward declaration class Toolbar; @@ -125,8 +126,13 @@ public: inline const int &getX(void) const { return ((hidden) ? frame.x_hidden : frame.x); } - inline const int getY(void) const - { return ((hidden || do_hide) ? frame.y_hidden : frame.y); } + // const int getY(void) const; + inline const int getY(void) const { + if (do_hide) return screen.size().h(); + else if (hidden) return frame.y_hidden; + else return frame.y; + } + void buttonPressEvent(XButtonEvent *); void buttonReleaseEvent(XButtonEvent *); -- 2.39.2