aboutsummaryrefslogtreecommitdiff
path: root/src/Basemenu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Basemenu.cc')
-rw-r--r--src/Basemenu.cc30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/Basemenu.cc b/src/Basemenu.cc
index 1e43455..c44658c 100644
--- a/src/Basemenu.cc
+++ b/src/Basemenu.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: Basemenu.cc,v 1.33 2002/10/22 14:46:11 fluxgen Exp $ 25// $Id: Basemenu.cc,v 1.34 2002/11/12 22:15:06 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -842,20 +842,21 @@ void Basemenu::buttonReleaseEvent(XButtonEvent *re) {
842 } 842 }
843 843
844 if (re->x >= 0 && re->x <= (signed) menu.width && 844 if (re->x >= 0 && re->x <= (signed) menu.width &&
845 re->y >= 0 && re->y <= (signed) menu.title_h) 845 re->y >= 0 && re->y <= (signed) menu.title_h)
846 if (re->button == 3) 846 if (re->button == 3)
847 hide(); 847 hide();
848 } else if (re->window == menu.frame &&
849 re->x >= 0 && re->x < (signed) menu.width &&
850 re->y >= 0 && re->y < (signed) menu.frame_h) {
851 848
852 if (re->button == 3) { 849 } else if (re->window == menu.frame &&
853 hide(); 850 re->x >= 0 && re->x < (signed) menu.width &&
854 } else { 851 re->y >= 0 && re->y < (signed) menu.frame_h) {
855 int sbl = (re->x / menu.item_w), i = (re->y / menu.item_h), 852
856 ix = sbl * menu.item_w, iy = i * menu.item_h, 853 if (re->button == 3) {
857 w = (sbl * menu.persub) + i, 854 hide();
858 p = (which_sbl * menu.persub) + which_press; 855 } else {
856 int sbl = (re->x / menu.item_w), i = (re->y / menu.item_h),
857 ix = sbl * menu.item_w, iy = i * menu.item_h,
858 w = (sbl * menu.persub) + i,
859 p = (which_sbl * menu.persub) + which_press;
859 860
860 if (w < static_cast<int>(menuitems.size()) && w >= 0) { 861 if (w < static_cast<int>(menuitems.size()) && w >= 0) {
861 drawItem(p, (p == which_sub), True); 862 drawItem(p, (p == which_sub), True);
@@ -868,6 +869,7 @@ void Basemenu::buttonReleaseEvent(XButtonEvent *re) {
868 } 869 }
869 } else 870 } else
870 drawItem(p, False, True); 871 drawItem(p, False, True);
872
871 } 873 }
872 } 874 }
873} 875}