aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r--src/IconButton.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index bc0c9d5..20fca8a 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconButton.cc,v 1.11 2003/10/31 20:02:49 rathnor Exp $ 23// $Id: IconButton.cc,v 1.12 2003/11/19 12:57:27 rathnor Exp $
24 24
25#include "IconButton.hh" 25#include "IconButton.hh"
26 26
@@ -53,18 +53,7 @@ public:
53 int x = event.xbutton.x_root - (m_win.menu().width() / 2); 53 int x = event.xbutton.x_root - (m_win.menu().width() / 2);
54 int y = event.xbutton.y_root - (m_win.menu().height() / 2); 54 int y = event.xbutton.y_root - (m_win.menu().height() / 2);
55 55
56 if (x < 0) 56 m_win.showMenu(x, y);
57 x = 0;
58 else if (x + m_win.menu().width() > m_win.screen().width())
59 x = m_win.screen().width() - m_win.menu().width();
60
61 if (y < 0)
62 y = 0;
63 else if (y + m_win.menu().height() > m_win.screen().height())
64 y = m_win.screen().height() - m_win.menu().height();
65
66 m_win.menu().move(x, y);
67 m_win.menu().show();
68 } 57 }
69private: 58private:
70 FluxboxWindow &m_win; 59 FluxboxWindow &m_win;