aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-04-08 22:36:30 (GMT)
committerfluxgen <fluxgen>2002-04-08 22:36:30 (GMT)
commit02253281ee96b0b68a3369d4a02bd90a216c9c58 (patch)
tree081aa5a95190c2feb78b0dae9cfb6ecdfa298e5f /src
parent1b64d4cfac125491bfebbfc598608b55bef5ca36 (diff)
downloadfluxbox-02253281ee96b0b68a3369d4a02bd90a216c9c58.zip
fluxbox-02253281ee96b0b68a3369d4a02bd90a216c9c58.tar.bz2
updated to match BaseMenu
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc48
-rw-r--r--src/Slit.cc16
-rw-r--r--src/Toolbar.cc14
-rw-r--r--src/Window.cc28
-rw-r--r--src/Windowmenu.cc8
-rw-r--r--src/fluxbox.cc26
6 files changed, 71 insertions, 69 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 86a3cee..79d627e 100644
--- a/src/Screen.cc
+++ b/src/Screen.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: Screen.cc,v 1.43 2002/04/04 14:28:54 fluxgen Exp $ 25// $Id: Screen.cc,v 1.44 2002/04/08 22:26:25 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -596,7 +596,7 @@ void BScreen::reconfigure(void) {
596 iconmenu->reconfigure(); 596 iconmenu->reconfigure();
597 597
598 { 598 {
599 int remember_sub = rootmenu->getCurrentSubmenu(); 599 int remember_sub = rootmenu->currentSubmenu();
600 initMenu(); 600 initMenu();
601 raiseWindows(0, 0); 601 raiseWindows(0, 0);
602 rootmenu->reconfigure(); 602 rootmenu->reconfigure();
@@ -984,48 +984,48 @@ void BScreen::raiseWindows(Window *workspace_stack, int num) {
984 984
985 Window session_stack[(num + workspacesList.size() + rootmenuList.size() + 30)]; 985 Window session_stack[(num + workspacesList.size() + rootmenuList.size() + 30)];
986 int i = 0; 986 int i = 0;
987 XRaiseWindow(getBaseDisplay()->getXDisplay(), iconmenu->getWindowID()); 987 XRaiseWindow(getBaseDisplay()->getXDisplay(), iconmenu->windowID());
988 session_stack[i++] = iconmenu->getWindowID(); 988 session_stack[i++] = iconmenu->windowID();
989 989
990 Workspaces::iterator wit = workspacesList.begin(); 990 Workspaces::iterator wit = workspacesList.begin();
991 Workspaces::iterator wit_end = workspacesList.end(); 991 Workspaces::iterator wit_end = workspacesList.end();
992 for (; wit != wit_end; ++wit) { 992 for (; wit != wit_end; ++wit) {
993 session_stack[i++] = (*wit)->getMenu()->getWindowID(); 993 session_stack[i++] = (*wit)->getMenu()->windowID();
994 } 994 }
995 995
996 session_stack[i++] = workspacemenu->getWindowID(); 996 session_stack[i++] = workspacemenu->windowID();
997 997
998 session_stack[i++] = configmenu->getFocusmenu()->getWindowID(); 998 session_stack[i++] = configmenu->getFocusmenu()->windowID();
999 session_stack[i++] = configmenu->getPlacementmenu()->getWindowID(); 999 session_stack[i++] = configmenu->getPlacementmenu()->windowID();
1000 session_stack[i++] = configmenu->getTabmenu()->getWindowID(); 1000 session_stack[i++] = configmenu->getTabmenu()->windowID();
1001 session_stack[i++] = configmenu->getWindowID(); 1001 session_stack[i++] = configmenu->windowID();
1002 1002
1003 #ifdef SLIT 1003 #ifdef SLIT
1004 session_stack[i++] = slit->getMenu().getDirectionmenu()->getWindowID(); 1004 session_stack[i++] = slit->getMenu().getDirectionmenu()->windowID();
1005 session_stack[i++] = slit->getMenu().getPlacementmenu()->getWindowID(); 1005 session_stack[i++] = slit->getMenu().getPlacementmenu()->windowID();
1006 #ifdef XINERAMA 1006 #ifdef XINERAMA
1007 if (hasXinerama()) { 1007 if (hasXinerama()) {
1008 session_stack[i++] = slit->getMenu().getHeadmenu()->getWindowID(); 1008 session_stack[i++] = slit->getMenu().getHeadmenu()->windowID();
1009 } 1009 }
1010 #endif // XINERAMA 1010 #endif // XINERAMA
1011 session_stack[i++] = slit->getMenu().getWindowID(); 1011 session_stack[i++] = slit->getMenu().windowID();
1012 #endif // SLIT 1012 #endif // SLIT
1013 1013
1014 session_stack[i++] = 1014 session_stack[i++] =
1015 toolbar->getMenu()->getPlacementmenu()->getWindowID(); 1015 toolbar->getMenu()->getPlacementmenu()->windowID();
1016 #ifdef XINERAMA 1016 #ifdef XINERAMA
1017 if (hasXinerama()) { 1017 if (hasXinerama()) {
1018 session_stack[i++] = toolbar->getMenu()->getHeadmenu()->getWindowID(); 1018 session_stack[i++] = toolbar->getMenu()->getHeadmenu()->windowID();
1019 } 1019 }
1020 #endif // XINERAMA 1020 #endif // XINERAMA
1021 session_stack[i++] = toolbar->getMenu()->getWindowID(); 1021 session_stack[i++] = toolbar->getMenu()->windowID();
1022 1022
1023 Rootmenus::iterator rit = rootmenuList.begin(); 1023 Rootmenus::iterator rit = rootmenuList.begin();
1024 Rootmenus::iterator rit_end = rootmenuList.end(); 1024 Rootmenus::iterator rit_end = rootmenuList.end();
1025 for (; rit != rit_end; ++rit) { 1025 for (; rit != rit_end; ++rit) {
1026 session_stack[i++] = (*rit)->getWindowID(); 1026 session_stack[i++] = (*rit)->windowID();
1027 } 1027 }
1028 session_stack[i++] = rootmenu->getWindowID(); 1028 session_stack[i++] = rootmenu->windowID();
1029 1029
1030 if (toolbar->isOnTop()) 1030 if (toolbar->isOnTop())
1031 session_stack[i++] = toolbar->getWindowID(); 1031 session_stack[i++] = toolbar->getWindowID();
@@ -1176,7 +1176,7 @@ void BScreen::raiseFocus(void) {
1176 1176
1177 if (fluxbox->getFocusedWindow()) 1177 if (fluxbox->getFocusedWindow())
1178 if (fluxbox->getFocusedWindow()->getScreen()->getScreenNumber() == 1178 if (fluxbox->getFocusedWindow()->getScreen()->getScreenNumber() ==
1179 getScreenNumber()) { 1179 getScreenNumber()) {
1180 have_focused = true; 1180 have_focused = true;
1181 focused_window_number = fluxbox->getFocusedWindow()->getWindowNumber(); 1181 focused_window_number = fluxbox->getFocusedWindow()->getWindowNumber();
1182 } 1182 }
@@ -1192,12 +1192,12 @@ void BScreen::initMenu(void) {
1192 if (rootmenu) { 1192 if (rootmenu) {
1193 rootmenuList.erase(rootmenuList.begin(), rootmenuList.end()); 1193 rootmenuList.erase(rootmenuList.begin(), rootmenuList.end());
1194 1194
1195 while (rootmenu->getCount()) 1195 while (rootmenu->numberOfItems())
1196 rootmenu->remove(0); 1196 rootmenu->remove(0);
1197 } else 1197 } else
1198 rootmenu = new Rootmenu(this); 1198 rootmenu = new Rootmenu(this);
1199 1199
1200 Bool defaultMenu = true; 1200 bool defaultMenu = true;
1201 1201
1202 if (fluxbox->getMenuFilename()) { 1202 if (fluxbox->getMenuFilename()) {
1203 ifstream menu_file(fluxbox->getMenuFilename()); 1203 ifstream menu_file(fluxbox->getMenuFilename());
@@ -1290,7 +1290,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
1290 1290
1291 I18n *i18n = I18n::instance(); 1291 I18n *i18n = I18n::instance();
1292 if (str_key == "end") { 1292 if (str_key == "end") {
1293 return ((menu->getCount() == 0) ? true : false); 1293 return ((menu->numberOfItems() == 0) ? true : false);
1294 } else if (str_key == "nop") { 1294 } else if (str_key == "nop") {
1295 menu->insert(str_label.c_str()); 1295 menu->insert(str_label.c_str());
1296 } else if (str_key == "exec") { // exec 1296 } else if (str_key == "exec") { // exec
@@ -1469,7 +1469,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
1469 } 1469 }
1470 } 1470 }
1471 1471
1472 return ((menu->getCount() == 0) ? true : false); 1472 return ((menu->numberOfItems() == 0) ? true : false);
1473} 1473}
1474 1474
1475void BScreen::createStyleMenu(Rootmenu *menu, bool newmenu, const char *label, const char *directory) { 1475void BScreen::createStyleMenu(Rootmenu *menu, bool newmenu, const char *label, const char *directory) {
diff --git a/src/Slit.cc b/src/Slit.cc
index f0a37c7..45ec396 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Slit.cc,v 1.11 2002/04/08 18:58:27 fluxgen Exp $ 22// $Id: Slit.cc,v 1.12 2002/04/08 22:26:58 fluxgen Exp $
23 23
24//use GNU extensions 24//use GNU extensions
25#ifndef _GNU_SOURCE 25#ifndef _GNU_SOURCE
@@ -567,20 +567,18 @@ void Slit::buttonPressEvent(XButtonEvent *e) {
567 XLowerWindow(display, frame.window); 567 XLowerWindow(display, frame.window);
568 } else if (e->button == Button3) { 568 } else if (e->button == Button3) {
569 if (! slitmenu.isVisible()) { 569 if (! slitmenu.isVisible()) {
570 int x, y; 570 int x = e->x_root - (slitmenu.width() / 2),
571 571 y = e->y_root - (slitmenu.height() / 2);
572 x = e->x_root - (slitmenu.getWidth() / 2);
573 y = e->y_root - (slitmenu.getHeight() / 2);
574 572
575 if (x < 0) 573 if (x < 0)
576 x = 0; 574 x = 0;
577 else if (x + slitmenu.getWidth() > screen->getWidth()) 575 else if (x + slitmenu.width() > screen->getWidth())
578 x = screen->getWidth() - slitmenu.getWidth(); 576 x = screen->getWidth() - slitmenu.width();
579 577
580 if (y < 0) 578 if (y < 0)
581 y = 0; 579 y = 0;
582 else if (y + slitmenu.getHeight() > screen->getHeight()) 580 else if (y + slitmenu.height() > screen->getHeight())
583 y = screen->getHeight() - slitmenu.getHeight(); 581 y = screen->getHeight() - slitmenu.height();
584 582
585 slitmenu.move(x, y); 583 slitmenu.move(x, y);
586 slitmenu.show(); 584 slitmenu.show();
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 546d970..389b6db 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.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: Toolbar.cc,v 1.19 2002/04/04 11:28:19 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.20 2002/04/08 22:30:51 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
@@ -1035,18 +1035,18 @@ void Toolbar::buttonPressEvent(XButtonEvent *be) {
1035 if (! toolbarmenu->isVisible()) { 1035 if (! toolbarmenu->isVisible()) {
1036 int x, y; 1036 int x, y;
1037 1037
1038 x = be->x_root - (toolbarmenu->getWidth() / 2); 1038 x = be->x_root - (toolbarmenu->width() / 2);
1039 y = be->y_root - (toolbarmenu->getHeight() / 2); 1039 y = be->y_root - (toolbarmenu->height() / 2);
1040 1040
1041 if (x < 0) 1041 if (x < 0)
1042 x = 0; 1042 x = 0;
1043 else if (x + toolbarmenu->getWidth() > screen->getWidth()) 1043 else if (x + toolbarmenu->width() > screen->getWidth())
1044 x = screen->getWidth() - toolbarmenu->getWidth(); 1044 x = screen->getWidth() - toolbarmenu->width();
1045 1045
1046 if (y < 0) 1046 if (y < 0)
1047 y = 0; 1047 y = 0;
1048 else if (y + toolbarmenu->getHeight() > screen->getHeight()) 1048 else if (y + toolbarmenu->height() > screen->getHeight())
1049 y = screen->getHeight() - toolbarmenu->getHeight(); 1049 y = screen->getHeight() - toolbarmenu->height();
1050 1050
1051 toolbarmenu->move(x, y); 1051 toolbarmenu->move(x, y);
1052 toolbarmenu->show(); 1052 toolbarmenu->show();
diff --git a/src/Window.cc b/src/Window.cc
index 3b0afd8..80edb86 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.40 2002/04/04 22:39:52 fluxgen Exp $ 25// $Id: Window.cc,v 1.41 2002/04/08 22:32:07 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -1377,7 +1377,7 @@ void FluxboxWindow::reconfigure(void) {
1377 XUngrabButton(display, Button1, AnyModifier, frame.plate); 1377 XUngrabButton(display, Button1, AnyModifier, frame.plate);
1378 1378
1379 if (windowmenu) { 1379 if (windowmenu) {
1380 windowmenu->move(windowmenu->getX(), frame.y + frame.title_h); 1380 windowmenu->move(windowmenu->x(), frame.y + frame.title_h);
1381 windowmenu->reconfigure(); 1381 windowmenu->reconfigure();
1382 } 1382 }
1383 1383
@@ -3192,30 +3192,30 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent *be) {
3192 int mx = 0, my = 0; 3192 int mx = 0, my = 0;
3193 3193
3194 if (frame.title == be->window || frame.label == be->window) { 3194 if (frame.title == be->window || frame.label == be->window) {
3195 mx = be->x_root - (windowmenu->getWidth() / 2); 3195 mx = be->x_root - (windowmenu->width() / 2);
3196 my = frame.y + frame.title_h; 3196 my = frame.y + frame.title_h;
3197 } else if (frame.handle == be->window) { 3197 } else if (frame.handle == be->window) {
3198 mx = be->x_root - (windowmenu->getWidth() / 2); 3198 mx = be->x_root - (windowmenu->width() / 2);
3199 my = frame.y + frame.y_handle - windowmenu->getHeight(); 3199 my = frame.y + frame.y_handle - windowmenu->height();
3200 } else { 3200 } else {
3201 bool buttonproc=false; 3201 bool buttonproc=false;
3202 3202
3203 if (buttonproc) 3203 if (buttonproc)
3204 mx = be->x_root - (windowmenu->getWidth() / 2); 3204 mx = be->x_root - (windowmenu->width() / 2);
3205 3205
3206 if (be->y <= (signed) frame.bevel_w) 3206 if (be->y <= (signed) frame.bevel_w)
3207 my = frame.y + frame.y_border; 3207 my = frame.y + frame.y_border;
3208 else 3208 else
3209 my = be->y_root - (windowmenu->getHeight() / 2); 3209 my = be->y_root - (windowmenu->height() / 2);
3210 } 3210 }
3211 3211
3212 if (mx > (signed) (frame.x + frame.width - windowmenu->getWidth())) 3212 if (mx > (signed) (frame.x + frame.width - windowmenu->width()))
3213 mx = frame.x + frame.width - windowmenu->getWidth(); 3213 mx = frame.x + frame.width - windowmenu->width();
3214 if (mx < frame.x) 3214 if (mx < frame.x)
3215 mx = frame.x; 3215 mx = frame.x;
3216 3216
3217 if (my > (signed) (frame.y + frame.y_handle - windowmenu->getHeight())) 3217 if (my > (signed) (frame.y + frame.y_handle - windowmenu->height()))
3218 my = frame.y + frame.y_handle - windowmenu->getHeight(); 3218 my = frame.y + frame.y_handle - windowmenu->height();
3219 if (my < (signed) (frame.y + ((decorations.titlebar) ? frame.title_h : 3219 if (my < (signed) (frame.y + ((decorations.titlebar) ? frame.title_h :
3220 frame.y_border))) 3220 frame.y_border)))
3221 my = frame.y + 3221 my = frame.y +
@@ -3225,9 +3225,9 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent *be) {
3225 if (! windowmenu->isVisible()) { // if not window menu is visible then show it 3225 if (! windowmenu->isVisible()) { // if not window menu is visible then show it
3226 windowmenu->move(mx, my); 3226 windowmenu->move(mx, my);
3227 windowmenu->show(); 3227 windowmenu->show();
3228 XRaiseWindow(display, windowmenu->getWindowID()); 3228 XRaiseWindow(display, windowmenu->windowID());
3229 XRaiseWindow(display, windowmenu->getSendToMenu()->getWindowID()); 3229 XRaiseWindow(display, windowmenu->getSendToMenu()->windowID());
3230 XRaiseWindow(display, windowmenu->getSendGroupToMenu()->getWindowID()); 3230 XRaiseWindow(display, windowmenu->getSendGroupToMenu()->windowID());
3231 } else //else hide menu 3231 } else //else hide menu
3232 windowmenu->hide(); 3232 windowmenu->hide();
3233 } 3233 }
diff --git a/src/Windowmenu.cc b/src/Windowmenu.cc
index a79c608..5846261 100644
--- a/src/Windowmenu.cc
+++ b/src/Windowmenu.cc
@@ -1,3 +1,5 @@
1// Windowmenu.cc for Fluxbox
2// Copyright (c) 2001-2002 Henrik Kinnunen (fluxgen@linuxmail.org)
1// Windowmenu.cc for Blackbox - an X11 Window manager 3// Windowmenu.cc for Blackbox - an X11 Window manager
2// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) 4// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
3// 5//
@@ -19,6 +21,8 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 22// DEALINGS IN THE SOFTWARE.
21 23
24// $Id: Windowmenu.cc,v 1.11 2002/04/08 22:35:16 fluxgen Exp $
25
22//use GNU extensions 26//use GNU extensions
23#ifndef _GNU_SOURCE 27#ifndef _GNU_SOURCE
24#define _GNU_SOURCE 28#define _GNU_SOURCE
@@ -228,9 +232,9 @@ void Windowmenu::SendtoWorkspacemenu::itemSelected(int button, unsigned int inde
228 232
229 233
230void Windowmenu::SendtoWorkspacemenu::update(void) { 234void Windowmenu::SendtoWorkspacemenu::update(void) {
231 unsigned int i, r = getCount(); 235 unsigned int i, r = numberOfItems();
232 236
233 if (getCount() != 0) { 237 if (numberOfItems() != 0) {
234 for (i = 0; i < r; ++i) 238 for (i = 0; i < r; ++i)
235 remove(0); 239 remove(0);
236 } 240 }
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index c2f53e2..3d7cc2d 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.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: fluxbox.cc,v 1.45 2002/04/04 14:23:54 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.46 2002/04/08 22:36:30 fluxgen Exp $
26 26
27//Use some GNU extensions 27//Use some GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -946,24 +946,24 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
946 946
947 } else if (be.button == 2) { 947 } else if (be.button == 2) {
948 int mx = be.x_root - 948 int mx = be.x_root -
949 (screen->getWorkspacemenu()->getWidth() / 2); 949 (screen->getWorkspacemenu()->width() / 2);
950 int my = be.y_root - 950 int my = be.y_root -
951 (screen->getWorkspacemenu()->getTitleHeight() / 2); 951 (screen->getWorkspacemenu()->titleHeight() / 2);
952 952
953 if (mx < 0) mx = 0; 953 if (mx < 0) mx = 0;
954 if (my < 0) my = 0; 954 if (my < 0) my = 0;
955 955
956 if (mx + screen->getWorkspacemenu()->getWidth() > 956 if (mx + screen->getWorkspacemenu()->width() >
957 screen->getWidth()) { 957 screen->getWidth()) {
958 mx = screen->getWidth() - 958 mx = screen->getWidth() -
959 screen->getWorkspacemenu()->getWidth() - 959 screen->getWorkspacemenu()->width() -
960 screen->getBorderWidth(); 960 screen->getBorderWidth();
961 } 961 }
962 962
963 if (my + screen->getWorkspacemenu()->getHeight() > 963 if (my + screen->getWorkspacemenu()->height() >
964 screen->getHeight()) { 964 screen->getHeight()) {
965 my = screen->getHeight() - 965 my = screen->getHeight() -
966 screen->getWorkspacemenu()->getHeight() - 966 screen->getWorkspacemenu()->height() -
967 screen->getBorderWidth(); 967 screen->getBorderWidth();
968 } 968 }
969 screen->getWorkspacemenu()->move(mx, my); 969 screen->getWorkspacemenu()->move(mx, my);
@@ -976,23 +976,23 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
976 //calculate placement of workspace menu 976 //calculate placement of workspace menu
977 //and show/hide it 977 //and show/hide it
978 int mx = be.x_root - 978 int mx = be.x_root -
979 (screen->getRootmenu()->getWidth() / 2); 979 (screen->getRootmenu()->width() / 2);
980 int my = be.y_root - 980 int my = be.y_root -
981 (screen->getRootmenu()->getTitleHeight() / 2); 981 (screen->getRootmenu()->titleHeight() / 2);
982 982
983 if (mx < 0) mx = 0; 983 if (mx < 0) mx = 0;
984 if (my < 0) my = 0; 984 if (my < 0) my = 0;
985 985
986 if (mx + screen->getRootmenu()->getWidth() > screen->getWidth()) { 986 if (mx + screen->getRootmenu()->width() > screen->getWidth()) {
987 mx = screen->getWidth() - 987 mx = screen->getWidth() -
988 screen->getRootmenu()->getWidth() - 988 screen->getRootmenu()->width() -
989 screen->getBorderWidth(); 989 screen->getBorderWidth();
990 } 990 }
991 991
992 if (my + screen->getRootmenu()->getHeight() > 992 if (my + screen->getRootmenu()->height() >
993 screen->getHeight()) { 993 screen->getHeight()) {
994 my = screen->getHeight() - 994 my = screen->getHeight() -
995 screen->getRootmenu()->getHeight() - 995 screen->getRootmenu()->height() -
996 screen->getBorderWidth(); 996 screen->getBorderWidth();
997 } 997 }
998 screen->getRootmenu()->move(mx, my); 998 screen->getRootmenu()->move(mx, my);