1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +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

@@ -968,6 +968,30 @@ handleEnterNotify(XEvent *event)
#ifdef DEBUG
L("got enter notify");
#endif
#ifdef VIRTUAL_DESKTOP
if (wPreferences.vedge_thickness) {
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);
} 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);
} 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);
} 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);
}
}
#endif
if (XCheckTypedWindowEvent(dpy, event->xcrossing.window, LeaveNotify,
&ev)) {
/* already left the window... */