mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
fixed bug in popupbutton scrolling
This commit is contained in:
@@ -575,8 +575,8 @@ autoScroll(void *data)
|
||||
int dy = 0;
|
||||
|
||||
|
||||
if (bPtr->scrollStartY >= scrHeight-1
|
||||
&& bPtr->menuView->pos.y+bPtr->menuView->size.height >= scrHeight-1) {
|
||||
if (bPtr->scrollStartY > scrHeight-1
|
||||
&& bPtr->menuView->pos.y+bPtr->menuView->size.height > scrHeight-1) {
|
||||
repeat = 1;
|
||||
|
||||
if (bPtr->menuView->pos.y+bPtr->menuView->size.height-5
|
||||
@@ -605,6 +605,9 @@ autoScroll(void *data)
|
||||
bPtr->highlightedItem = (bPtr->scrollStartY - bPtr->menuView->pos.y)
|
||||
/ bPtr->view->size.height;
|
||||
|
||||
if (bPtr->highlightedItem >= WMGetBagItemCount(bPtr->items))
|
||||
bPtr->highlightedItem = WMGetBagItemCount(bPtr->items)-1;
|
||||
|
||||
if (oldItem!=bPtr->highlightedItem) {
|
||||
WMMenuItem *item =
|
||||
WMGetPopUpButtonMenuItem(bPtr, bPtr->highlightedItem);
|
||||
|
||||
Reference in New Issue
Block a user