aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-12 19:45:46 (GMT)
committerfluxgen <fluxgen>2003-12-12 19:45:46 (GMT)
commite0411a94f74b3644bb6ad0784d9ad3d0c4b51a36 (patch)
tree2a1bf6d0e47a605ef94648b8c9117b97d932675a /src/FbTk
parentb14e77d99be81b6295dfe8ff3ed03c9f749ffb88 (diff)
downloadfluxbox-e0411a94f74b3644bb6ad0784d9ad3d0c4b51a36.zip
fluxbox-e0411a94f74b3644bb6ad0784d9ad3d0c4b51a36.tar.bz2
fixed menu timer bug
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Menu.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 77ddd5d..84345c9 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.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: Menu.cc,v 1.46 2003/12/12 18:18:49 fluxgen Exp $ 25// $Id: Menu.cc,v 1.47 2003/12/12 19:45:46 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -1121,8 +1121,9 @@ void Menu::buttonReleaseEvent(XButtonEvent &re) {
1121 1121
1122 1122
1123void Menu::motionNotifyEvent(XMotionEvent &me) { 1123void Menu::motionNotifyEvent(XMotionEvent &me) {
1124 m_hide_timer.stop(); 1124
1125 if (me.window == menu.title && (me.state & Button1Mask)) { 1125 if (me.window == menu.title && (me.state & Button1Mask)) {
1126 stopHide();
1126 if (movable) { 1127 if (movable) {
1127 if (! moving) { 1128 if (! moving) {
1128 if (m_parent && (! torn)) { 1129 if (m_parent && (! torn)) {
@@ -1147,6 +1148,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
1147 } else if ((! (me.state & Button1Mask)) && me.window == menu.frame && 1148 } else if ((! (me.state & Button1Mask)) && me.window == menu.frame &&
1148 me.x >= 0 && me.x < (signed) width() && 1149 me.x >= 0 && me.x < (signed) width() &&
1149 me.y >= 0 && me.y < (signed) menu.frame_h) { 1150 me.y >= 0 && me.y < (signed) menu.frame_h) {
1151 stopHide();
1150 int sbl = (me.x / menu.item_w), i = (me.y / menu.item_h), 1152 int sbl = (me.x / menu.item_w), i = (me.y / menu.item_h),
1151 w = (sbl * menu.persub) + i; 1153 w = (sbl * menu.persub) + i;
1152 1154
@@ -1186,10 +1188,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
1186 drawItem(w, true); 1188 drawItem(w, true);
1187 1189
1188 if (theme().menuMode() == MenuTheme::DELAY_OPEN) { 1190 if (theme().menuMode() == MenuTheme::DELAY_OPEN) {
1189 cerr<<"menuMode DELAY_OPEN"<<endl;
1190 // setup show menu timer 1191 // setup show menu timer
1191 stopHide();
1192
1193 timeval timeout; 1192 timeval timeout;
1194 timeout.tv_sec = 0; 1193 timeout.tv_sec = 0;
1195 timeout.tv_usec = theme().delayOpen(); 1194 timeout.tv_usec = theme().delayOpen();
@@ -1392,18 +1391,15 @@ void Menu::openSubmenu() {
1392 if (item < 0 || item >= menuitems.size()) 1391 if (item < 0 || item >= menuitems.size())
1393 return; 1392 return;
1394 1393
1395 stopHide(); 1394 drawItem(item, true);
1396
1397 if (menuitems[item]->submenu() != 0 && !menuitems[item]->submenu()->isVisible()) 1395 if (menuitems[item]->submenu() != 0 && !menuitems[item]->submenu()->isVisible())
1398 drawSubmenu(item); 1396 drawSubmenu(item);
1399 1397
1400} 1398}
1401 1399
1402void Menu::closeMenu() { 1400void Menu::closeMenu() {
1403 if (isVisible() && 1401 if (isVisible() && !isTorn())
1404 !isTorn()) {
1405 internal_hide(); 1402 internal_hide();
1406 }
1407} 1403}
1408 1404
1409void Menu::startHide() { 1405void Menu::startHide() {