all repos — openbox @ fe9b1efde5e46c00679d0435601f915099a574b0

openbox fork - make it a bit more like ryudo

fixed snap to edges with toolbar hidden
Scott Moynes smoynes@nexus.carleton.ca
commit

fe9b1efde5e46c00679d0435601f915099a574b0

parent

43e9d583c5fa8378013169929d0ef54e1dccb6fa

1 files changed, 8 insertions(+), 2 deletions(-)

jump to
M src/Toolbar.hsrc/Toolbar.h

@@ -27,6 +27,7 @@ #include <X11/Xlib.h>

#include "Basemenu.h" #include "Timer.h" +#include "Screen.h" // forward declaration class Toolbar;

@@ -125,8 +126,13 @@ }

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 *);