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