1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

Virtual desktop code (very experiment!!!!!)

This commit is contained in:
id
1999-12-18 11:52:49 +00:00
parent 087fc7c82c
commit 8eb0c79c54
9 changed files with 192 additions and 0 deletions

View File

@@ -1612,6 +1612,23 @@ getScrollAmount(WMenu *menu, int *hamount, int *vamount)
getPointerPosition(scr, &xroot, &yroot);
#ifdef VIRTUAL_DESKTOP
if (wPreferences.vedge_thickness) {
if (xroot <= wPreferences.vedge_thickness + 1 && menuX1 < wPreferences.vedge_thickness) {
/* scroll to the right */
*hamount = MIN(MENU_SCROLL_STEP, abs(menuX1));
} else if (xroot >= screenW-2-wPreferences.vedge_thickness && menuX2 > screenW-1-wPreferences.vedge_thickness) {
/* scroll to the left */
*hamount = MIN(MENU_SCROLL_STEP, abs(menuX2-screenW-1));
if (*hamount==0)
*hamount = 1;
*hamount = -*hamount;
}
} else
#endif
if (xroot <= 1 && menuX1 < 0) {
/* scroll to the right */