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:
16
src/event.c
16
src/event.c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user