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

Changes relate to virtual edge.

This commit is contained in:
id
2000-11-17 02:10:32 +00:00
parent 899226207d
commit 816ce22875
7 changed files with 55 additions and 38 deletions

View File

@@ -1002,20 +1002,20 @@ handleEnterNotify(XEvent *event)
int x,y;
if (event->xcrossing.window == scr->virtual_edge_r) {
XWarpPointer(dpy, None, scr->root_win, 0,0,0,0, scr->scr_width - wPreferences.vedge_thickness - 1, event->xcrossing.y_root);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y);
wWorkspaceSetViewPort(scr, scr->current_workspace, x+30, y);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y, NULL, NULL);
wWorkspaceSetViewPort(scr, scr->current_workspace, x + VIRTUALEDGE_SCROLL_HSTEP, y);
} else if (event->xcrossing.window == scr->virtual_edge_l) {
XWarpPointer(dpy, None, scr->root_win, 0,0,0,0, wPreferences.vedge_thickness + 1, event->xcrossing.y_root);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y);
wWorkspaceSetViewPort(scr, scr->current_workspace, x-30, y);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y, NULL, NULL);
wWorkspaceSetViewPort(scr, scr->current_workspace, x - VIRTUALEDGE_SCROLL_HSTEP, y);
} else if (event->xcrossing.window == scr->virtual_edge_u) {
XWarpPointer(dpy, None, scr->root_win, 0,0,0,0, event->xcrossing.x_root, wPreferences.vedge_thickness + 1);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y);
wWorkspaceSetViewPort(scr, scr->current_workspace, x, y-30);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y, NULL, NULL);
wWorkspaceSetViewPort(scr, scr->current_workspace, x, y - VIRTUALEDGE_SCROLL_VSTEP);
} else if (event->xcrossing.window == scr->virtual_edge_d) {
XWarpPointer(dpy, None, scr->root_win, 0,0,0,0, event->xcrossing.x_root, scr->scr_height - wPreferences.vedge_thickness - 1);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y);
wWorkspaceSetViewPort(scr, scr->current_workspace, x, y+30);
wWorkspaceGetViewPosition(scr, scr->current_workspace, &x, &y, NULL, NULL);
wWorkspaceSetViewPort(scr, scr->current_workspace, x, y + VIRTUALEDGE_SCROLL_VSTEP);
}
}
#endif