mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
Remove VIRTUAL_DESKTOP code
Even the option to enable "virtual desktop" in configure.ac was commented out...and I would never intend to use it anyway. So let's just remove the ~800 lines of #ifdef'ed code to have a cleaner code base to read when bored.
This commit is contained in:
555
src/workspace.c
555
src/workspace.c
@@ -115,11 +115,6 @@ int wWorkspaceNew(WScreen * scr)
|
||||
|
||||
wWorkspaceMenuUpdate(scr, scr->workspace_menu);
|
||||
wWorkspaceMenuUpdate(scr, scr->clip_ws_menu);
|
||||
#ifdef VIRTUAL_DESKTOP
|
||||
wspace->view_x = wspace->view_y = 0;
|
||||
wspace->height = scr->scr_height;
|
||||
wspace->width = scr->scr_width;
|
||||
#endif
|
||||
wNETWMUpdateDesktop(scr);
|
||||
WMPostNotificationName(WMNWorkspaceCreated, scr, (void *)(uintptr_t) (scr->workspace_count - 1));
|
||||
XFlush(dpy);
|
||||
@@ -624,556 +619,6 @@ void wWorkspaceForceChange(WScreen * scr, int workspace)
|
||||
/* XSync(dpy, False); */
|
||||
}
|
||||
|
||||
#ifdef VIRTUAL_DESKTOP
|
||||
|
||||
/* TODO:
|
||||
*
|
||||
* 1) Allow border around each window so the scrolling
|
||||
* won't just stop at the border.
|
||||
* 2) Make pager.
|
||||
*
|
||||
*/
|
||||
|
||||
#define vec_sub(a, b) wmkpoint((a).x-(b).x, (a).y-(b).y)
|
||||
#define vec_add(a, b) wmkpoint((a).x+(b).x, (a).y+(b).y)
|
||||
#define vec_inc(a, b) do { (a).x+=(b).x; (a).y+=(b).y; } while(0)
|
||||
#define vec_dot(a, b) ((a).x*(b).x + (a).y*(b).y)
|
||||
#define vec_scale(a, s) wmkpoint((a).x*s, (a).y*s)
|
||||
#define vec_scale2(a, s, t) wmkpoint((a).x*s, (a).y*t)
|
||||
|
||||
#ifndef HAS_BORDER
|
||||
#define HAS_BORDER(w) (!(WFLAGP((w), no_border)))
|
||||
#endif
|
||||
|
||||
#ifndef IS_VSTUCK
|
||||
#define IS_VSTUCK(w) (WFLAGP((w), virtual_stick))
|
||||
#endif
|
||||
|
||||
#define updateMinimum(l,p,ml,mp) do { if (cmp(l) && (l)<(ml)) { (ml)=(l); (mp)=(p); }; } while(0)
|
||||
|
||||
static Bool cmp_gez(int i)
|
||||
{
|
||||
return (i >= 0);
|
||||
}
|
||||
|
||||
static Bool cmp_gz(int i)
|
||||
{
|
||||
return (i > 0);
|
||||
}
|
||||
|
||||
static WMPoint getClosestEdge(WScreen * scr, WMPoint direction, Bool(*cmp) (int))
|
||||
{
|
||||
WMPoint closest = wmkpoint(0, 0);
|
||||
int closest_len = INT_MAX;
|
||||
WWindow *wwin;
|
||||
|
||||
for (wwin = scr->focused_window; wwin; wwin = wwin->prev) {
|
||||
if (wwin->frame->workspace == scr->current_workspace) {
|
||||
if (!wwin->flags.miniaturized && !IS_VSTUCK(wwin) && !wwin->flags.hidden) {
|
||||
int border = 2 * HAS_BORDER(wwin);
|
||||
int len;
|
||||
int x1, x2, y1, y2;
|
||||
int head = wGetHeadForWindow(wwin);
|
||||
WArea area = wGetUsableAreaForHead(scr, head, NULL, False);
|
||||
WMPoint p;
|
||||
|
||||
x1 = wwin->frame_x - area.x1;
|
||||
y1 = wwin->frame_y - area.y1;
|
||||
x2 = wwin->frame_x + wwin->frame->core->width + border - area.x2;
|
||||
y2 = wwin->frame_y + wwin->frame->core->height + border - area.y2;
|
||||
|
||||
p = wmkpoint(x1, y1);
|
||||
len = vec_dot(direction, p);
|
||||
updateMinimum(len, p, closest_len, closest);
|
||||
|
||||
p = wmkpoint(x1, y2);
|
||||
len = vec_dot(direction, p);
|
||||
updateMinimum(len, p, closest_len, closest);
|
||||
|
||||
p = wmkpoint(x2, y1);
|
||||
len = vec_dot(direction, p);
|
||||
updateMinimum(len, p, closest_len, closest);
|
||||
|
||||
p = wmkpoint(x2, y2);
|
||||
len = vec_dot(direction, p);
|
||||
updateMinimum(len, p, closest_len, closest);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return closest;
|
||||
}
|
||||
|
||||
static void getViewPosition(WScreen * scr, int workspace, int *x, int *y)
|
||||
{
|
||||
*x = scr->workspaces[workspace]->view_x;
|
||||
*y = scr->workspaces[workspace]->view_y;
|
||||
}
|
||||
|
||||
void wWorkspaceKeyboardMoveDesktop(WScreen * scr, WMPoint direction)
|
||||
{
|
||||
int x, y;
|
||||
WMPoint edge = getClosestEdge(scr, direction, cmp_gz);
|
||||
int len = vec_dot(edge, direction);
|
||||
WMPoint step = vec_scale(direction, len);
|
||||
getViewPosition(scr, scr->current_workspace, &x, &y);
|
||||
wWorkspaceSetViewport(scr, scr->current_workspace, x + step.x, y + step.y);
|
||||
}
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
static void vdMouseMoveDesktop(XEvent * event, WMPoint direction)
|
||||
{
|
||||
static int lock = False;
|
||||
if (lock)
|
||||
return;
|
||||
lock = True;
|
||||
|
||||
Bool done = False;
|
||||
Bool moved = True;
|
||||
WScreen *scr = wScreenForRootWindow(event->xcrossing.root);
|
||||
WMPoint old_pos = wmkpoint(event->xcrossing.x_root, event->xcrossing.y_root);
|
||||
WMPoint step;
|
||||
int x, y;
|
||||
int resisted = 0;
|
||||
|
||||
if (XGrabPointer(dpy, event->xcrossing.window, False,
|
||||
PointerMotionMask, GrabModeAsync, GrabModeAsync,
|
||||
scr->root_win, wCursor[WCUR_EMPTY], CurrentTime) != GrabSuccess) {
|
||||
|
||||
/* if the grab fails, do it the old fashioned way */
|
||||
step = vec_scale2(direction, wPreferences.vedge_hscrollspeed, wPreferences.vedge_vscrollspeed);
|
||||
getViewPosition(scr, scr->current_workspace, &x, &y);
|
||||
if (wWorkspaceSetViewport(scr, scr->current_workspace, x + step.x, y + step.y)) {
|
||||
step = vec_scale(direction, 2);
|
||||
XWarpPointer(dpy, None, scr->root_win, 0, 0, 0, 0,
|
||||
event->xcrossing.x_root - step.x, event->xcrossing.y_root - step.y);
|
||||
}
|
||||
goto exit;
|
||||
}
|
||||
XSync(dpy, True);
|
||||
|
||||
if (old_pos.x < 0)
|
||||
old_pos.x = 0;
|
||||
if (old_pos.y < 0)
|
||||
old_pos.y = 0;
|
||||
if (old_pos.x > scr->scr_width)
|
||||
old_pos.x = scr->scr_width;
|
||||
if (old_pos.y > scr->scr_height)
|
||||
old_pos.y = scr->scr_height;
|
||||
|
||||
while (!done) {
|
||||
XEvent ev;
|
||||
if (moved) {
|
||||
XWarpPointer(dpy, None, scr->root_win, 0, 0, 0, 0,
|
||||
scr->scr_width / 2, scr->scr_height / 2);
|
||||
moved = False;
|
||||
}
|
||||
WMMaskEvent(dpy, PointerMotionMask, &ev);
|
||||
|
||||
switch (ev.type) {
|
||||
case MotionNotify:
|
||||
{
|
||||
int step_len;
|
||||
step = wmkpoint(ev.xmotion.x_root - scr->scr_width / 2,
|
||||
ev.xmotion.y_root - scr->scr_height / 2);
|
||||
step_len = vec_dot(step, direction);
|
||||
if (step_len < 0) {
|
||||
done = True;
|
||||
break;
|
||||
}
|
||||
|
||||
if (step_len > 0) {
|
||||
Bool do_move = True;
|
||||
int resist = wPreferences.vedge_resistance;
|
||||
WMPoint closest;
|
||||
int closest_len = INT_MAX;
|
||||
if (resist) {
|
||||
closest = getClosestEdge(scr, direction, cmp_gez);
|
||||
closest_len = vec_dot(direction, closest);
|
||||
}
|
||||
|
||||
if (!closest_len) {
|
||||
resisted += step_len;
|
||||
do_move = resisted >= resist;
|
||||
if (do_move) {
|
||||
closest_len = INT_MAX;
|
||||
step_len = resisted - resist;
|
||||
resisted = 0;
|
||||
}
|
||||
}
|
||||
if (do_move) {
|
||||
if (closest_len <= wPreferences.vedge_attraction) {
|
||||
step = vec_scale(direction, closest_len);
|
||||
} else {
|
||||
step = vec_scale(direction, step_len);
|
||||
}
|
||||
|
||||
getViewPosition(scr, scr->current_workspace, &x, &y);
|
||||
wWorkspaceSetViewport(scr, scr->current_workspace,
|
||||
x + step.x, y + step.y);
|
||||
moved = True;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
step = vec_add(old_pos, vec_scale(direction, -1));
|
||||
XWarpPointer(dpy, None, scr->root_win, 0, 0, 0, 0, step.x, step.y);
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
|
||||
exit:
|
||||
lock = False;
|
||||
}
|
||||
|
||||
static void vdHandleEnter_u(XEvent * event)
|
||||
{
|
||||
vdMouseMoveDesktop(event, VEC_UP);
|
||||
}
|
||||
|
||||
static void vdHandleEnter_d(XEvent * event)
|
||||
{
|
||||
vdMouseMoveDesktop(event, VEC_DOWN);
|
||||
}
|
||||
|
||||
static void vdHandleEnter_l(XEvent * event)
|
||||
{
|
||||
vdMouseMoveDesktop(event, VEC_LEFT);
|
||||
}
|
||||
|
||||
static void vdHandleEnter_r(XEvent * event)
|
||||
{
|
||||
vdMouseMoveDesktop(event, VEC_RIGHT);
|
||||
}
|
||||
|
||||
#define LEFT_EDGE 0x01
|
||||
#define RIGHT_EDGE 0x02
|
||||
#define TOP_EDGE 0x04
|
||||
#define BOTTOM_EDGE 0x08
|
||||
#define ALL_EDGES 0x0F
|
||||
|
||||
static void createEdges(WScreen * scr)
|
||||
{
|
||||
if (!scr->virtual_edges) {
|
||||
int i, j, w;
|
||||
int vmask;
|
||||
XSetWindowAttributes attribs;
|
||||
|
||||
int heads = wXineramaHeads(scr);
|
||||
int *hasEdges = (int *)wmalloc(sizeof(int) * heads);
|
||||
|
||||
int thickness = 1;
|
||||
int nr_edges = 0;
|
||||
int max_edges = 4 * heads;
|
||||
int head;
|
||||
Window *edges = (Window *) wmalloc(sizeof(Window) * max_edges);
|
||||
|
||||
for (i = 0; i < heads; ++i)
|
||||
hasEdges[i] = ALL_EDGES;
|
||||
for (i = 0; i < heads; ++i) {
|
||||
WMRect i_rect = wGetRectForHead(scr, i);
|
||||
for (j = i + 1; j < heads; ++j) {
|
||||
WMRect j_rect = wGetRectForHead(scr, j);
|
||||
|
||||
int vlen = (WMIN(i_rect.pos.y + i_rect.size.height,
|
||||
j_rect.pos.y + j_rect.size.height) -
|
||||
WMAX(i_rect.pos.y, j_rect.pos.y));
|
||||
|
||||
int hlen = (WMIN(i_rect.pos.x + i_rect.size.width,
|
||||
j_rect.pos.x + j_rect.size.width) -
|
||||
WMAX(i_rect.pos.x, j_rect.pos.x));
|
||||
|
||||
if (vlen > 0 && hlen == 0) { /* horz alignment, vert edges touch */
|
||||
if (i_rect.pos.x < j_rect.pos.x) { /* i left of j */
|
||||
hasEdges[i] &= ~RIGHT_EDGE;
|
||||
hasEdges[j] &= ~LEFT_EDGE;
|
||||
} else { /* j left of i */
|
||||
hasEdges[j] &= ~RIGHT_EDGE;
|
||||
hasEdges[i] &= ~LEFT_EDGE;
|
||||
}
|
||||
} else if (vlen == 0 && hlen > 0) { /* vert alignment, horz edges touch */
|
||||
if (i_rect.pos.y < j_rect.pos.y) { /* i top of j */
|
||||
hasEdges[i] &= ~BOTTOM_EDGE;
|
||||
hasEdges[j] &= ~TOP_EDGE;
|
||||
} else { /* j top of i */
|
||||
hasEdges[j] &= ~BOTTOM_EDGE;
|
||||
hasEdges[i] &= ~TOP_EDGE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (w = 0; w < scr->workspace_count; w++) {
|
||||
/* puts("reset workspace"); */
|
||||
wWorkspaceSetViewport(scr, w, 0, 0);
|
||||
}
|
||||
|
||||
vmask = CWEventMask | CWOverrideRedirect;
|
||||
attribs.event_mask = (EnterWindowMask | LeaveWindowMask | VisibilityChangeMask);
|
||||
attribs.override_redirect = True;
|
||||
|
||||
for (head = 0; head < wXineramaHeads(scr); ++head) {
|
||||
WMRect rect = wGetRectForHead(scr, head);
|
||||
|
||||
if (hasEdges[head] & TOP_EDGE) {
|
||||
edges[nr_edges] =
|
||||
XCreateWindow(dpy, scr->root_win, rect.pos.x, rect.pos.y,
|
||||
rect.size.width, thickness, 0,
|
||||
CopyFromParent, InputOnly, CopyFromParent, vmask, &attribs);
|
||||
XSaveContext(dpy, edges[nr_edges], wVEdgeContext, (XPointer) vdHandleEnter_u);
|
||||
++nr_edges;
|
||||
}
|
||||
|
||||
if (hasEdges[head] & BOTTOM_EDGE) {
|
||||
edges[nr_edges] =
|
||||
XCreateWindow(dpy, scr->root_win, rect.pos.x,
|
||||
rect.pos.y + rect.size.height - thickness,
|
||||
rect.size.width, thickness, 0,
|
||||
CopyFromParent, InputOnly, CopyFromParent, vmask, &attribs);
|
||||
XSaveContext(dpy, edges[nr_edges], wVEdgeContext, (XPointer) vdHandleEnter_d);
|
||||
++nr_edges;
|
||||
}
|
||||
|
||||
if (hasEdges[head] & LEFT_EDGE) {
|
||||
edges[nr_edges] =
|
||||
XCreateWindow(dpy, scr->root_win, rect.pos.x, rect.pos.y,
|
||||
thickness, rect.pos.y + rect.size.height, 0,
|
||||
CopyFromParent, InputOnly, CopyFromParent, vmask, &attribs);
|
||||
XSaveContext(dpy, edges[nr_edges], wVEdgeContext, (XPointer) vdHandleEnter_l);
|
||||
++nr_edges;
|
||||
}
|
||||
|
||||
if (hasEdges[head] & RIGHT_EDGE) {
|
||||
edges[nr_edges] =
|
||||
XCreateWindow(dpy, scr->root_win,
|
||||
rect.pos.x + rect.size.width - thickness, rect.pos.y,
|
||||
thickness, rect.size.height, 0,
|
||||
CopyFromParent, InputOnly, CopyFromParent, vmask, &attribs);
|
||||
XSaveContext(dpy, edges[nr_edges], wVEdgeContext, (XPointer) vdHandleEnter_r);
|
||||
++nr_edges;
|
||||
}
|
||||
}
|
||||
|
||||
scr->virtual_nr_edges = nr_edges;
|
||||
scr->virtual_edges = edges;
|
||||
|
||||
for (i = 0; i < scr->virtual_nr_edges; ++i) {
|
||||
XMapWindow(dpy, scr->virtual_edges[i]);
|
||||
}
|
||||
wWorkspaceRaiseEdge(scr);
|
||||
|
||||
wfree(hasEdges);
|
||||
}
|
||||
}
|
||||
|
||||
static void destroyEdges(WScreen * scr)
|
||||
{
|
||||
if (scr->virtual_edges) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < scr->virtual_nr_edges; ++i) {
|
||||
XDeleteContext(dpy, scr->virtual_edges[i], wVEdgeContext);
|
||||
XUnmapWindow(dpy, scr->virtual_edges[i]);
|
||||
XDestroyWindow(dpy, scr->virtual_edges[i]);
|
||||
}
|
||||
|
||||
wfree(scr->virtual_edges);
|
||||
scr->virtual_edges = NULL;
|
||||
scr->virtual_nr_edges = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void wWorkspaceUpdateEdge(WScreen * scr)
|
||||
{
|
||||
if (wPreferences.vdesk_enable) {
|
||||
createEdges(scr);
|
||||
} else {
|
||||
destroyEdges(scr);
|
||||
}
|
||||
}
|
||||
|
||||
void wWorkspaceRaiseEdge(WScreen * scr)
|
||||
{
|
||||
static int toggle = 0;
|
||||
int i;
|
||||
|
||||
if (!scr->virtual_edges)
|
||||
return;
|
||||
|
||||
if (toggle) {
|
||||
for (i = 0; i < scr->virtual_nr_edges; ++i) {
|
||||
XRaiseWindow(dpy, scr->virtual_edges[i]);
|
||||
}
|
||||
} else {
|
||||
for (i = scr->virtual_nr_edges - 1; i >= 0; --i) {
|
||||
XRaiseWindow(dpy, scr->virtual_edges[i]);
|
||||
}
|
||||
}
|
||||
|
||||
toggle ^= 1;
|
||||
}
|
||||
|
||||
void wWorkspaceLowerEdge(WScreen * scr)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < scr->virtual_nr_edges; ++i) {
|
||||
XLowerWindow(dpy, scr->virtual_edges[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void wWorkspaceResizeViewport(WScreen * scr, int workspace)
|
||||
{
|
||||
int x, y;
|
||||
getViewPosition(scr, scr->current_workspace, &x, &y);
|
||||
wWorkspaceSetViewport(scr, scr->current_workspace, x, y);
|
||||
}
|
||||
|
||||
void updateWorkspaceGeometry(WScreen * scr, int workspace, int *view_x, int *view_y)
|
||||
{
|
||||
int most_left, most_right, most_top, most_bottom;
|
||||
WWindow *wwin;
|
||||
|
||||
int heads = wXineramaHeads(scr);
|
||||
typedef int strut_t[4];
|
||||
strut_t *strut = (strut_t *) wmalloc(heads * sizeof(strut_t));
|
||||
int head, i;
|
||||
|
||||
for (head = 0; head < heads; ++head) {
|
||||
WMRect rect = wGetRectForHead(scr, head);
|
||||
WArea area = wGetUsableAreaForHead(scr, head, NULL, False);
|
||||
strut[head][0] = area.x1 - rect.pos.x;
|
||||
strut[head][1] = rect.pos.x + rect.size.width - area.x2;
|
||||
strut[head][2] = area.y1 - rect.pos.y;
|
||||
strut[head][3] = rect.pos.y + rect.size.height - area.y2;
|
||||
}
|
||||
|
||||
/* adjust workspace layout */
|
||||
wwin = scr->focused_window;
|
||||
most_right = 0;
|
||||
most_bottom = 0;
|
||||
most_left = scr->scr_width;
|
||||
most_top = scr->scr_height;
|
||||
for (; wwin; wwin = wwin->prev) {
|
||||
if (wwin->frame->workspace == workspace) {
|
||||
if (!wwin->flags.miniaturized && !IS_VSTUCK(wwin) && !wwin->flags.hidden) {
|
||||
|
||||
head = wGetHeadForWindow(wwin);
|
||||
|
||||
i = wwin->frame_x - strut[head][0];
|
||||
if (i < most_left) /* record positions, should this be cached? */
|
||||
most_left = i;
|
||||
i = wwin->frame_x + wwin->frame->core->width + strut[head][1];
|
||||
if (HAS_BORDER(wwin))
|
||||
i += 2;
|
||||
if (i > most_right)
|
||||
most_right = i;
|
||||
i = wwin->frame_y - strut[head][2];
|
||||
if (i < most_top)
|
||||
most_top = i;
|
||||
i = wwin->frame_y + wwin->frame->core->height + strut[head][3];
|
||||
if (HAS_BORDER(wwin))
|
||||
i += 2;
|
||||
if (i > most_bottom) {
|
||||
most_bottom = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (most_left > 0)
|
||||
most_left = 0;
|
||||
if (most_top > 0)
|
||||
most_top = 0;
|
||||
|
||||
scr->workspaces[workspace]->width = WMAX(most_right, scr->scr_width) - WMIN(most_left, 0);
|
||||
scr->workspaces[workspace]->height = WMAX(most_bottom, scr->scr_height) - WMIN(most_top, 0);
|
||||
|
||||
*view_x += -most_left - scr->workspaces[workspace]->view_x;
|
||||
scr->workspaces[workspace]->view_x = -most_left;
|
||||
|
||||
*view_y += -most_top - scr->workspaces[workspace]->view_y;
|
||||
scr->workspaces[workspace]->view_y = -most_top;
|
||||
|
||||
wfree(strut);
|
||||
}
|
||||
|
||||
typedef struct _delay_configure {
|
||||
WWindow *wwin;
|
||||
int delay_count;
|
||||
} _delay_configure;
|
||||
|
||||
void sendConfigureNotify(_delay_configure * delay)
|
||||
{
|
||||
WWindow *wwin;
|
||||
|
||||
delay->delay_count--;
|
||||
if (!delay->delay_count) {
|
||||
for (wwin = delay->wwin; wwin; wwin = wwin->prev) {
|
||||
wWindowSynthConfigureNotify(wwin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bool wWorkspaceSetViewport(WScreen * scr, int workspace, int view_x, int view_y)
|
||||
{
|
||||
Bool adjust_flag = False;
|
||||
int diff_x, diff_y;
|
||||
static _delay_configure delay_configure = { NULL, 0 };
|
||||
WWorkspace *wptr;
|
||||
WWindow *wwin;
|
||||
|
||||
wptr = scr->workspaces[workspace];
|
||||
|
||||
/*printf("wWorkspaceSetViewport %d %d\n", view_x, view_y); */
|
||||
|
||||
updateWorkspaceGeometry(scr, workspace, &view_x, &view_y);
|
||||
|
||||
if (view_x + scr->scr_width > wptr->width) {
|
||||
/* puts("right edge of vdesk"); */
|
||||
view_x = wptr->width - scr->scr_width;
|
||||
}
|
||||
if (view_x < 0) {
|
||||
/* puts("left edge of vdesk"); */
|
||||
view_x = 0;
|
||||
}
|
||||
if (view_y + scr->scr_height > wptr->height) {
|
||||
/* puts("right edge of vdesk"); */
|
||||
view_y = wptr->height - scr->scr_height;
|
||||
}
|
||||
if (view_y < 0) {
|
||||
/* puts("left edge of vdesk"); */
|
||||
view_y = 0;
|
||||
}
|
||||
|
||||
diff_x = wptr->view_x - view_x;
|
||||
diff_y = wptr->view_y - view_y;
|
||||
if (!diff_x && !diff_y)
|
||||
return False;
|
||||
|
||||
wptr->view_x = view_x;
|
||||
wptr->view_y = view_y;
|
||||
|
||||
wNETWMUpdateDesktop(scr);
|
||||
|
||||
for (wwin = scr->focused_window; wwin; wwin = wwin->prev) {
|
||||
if (wwin->frame->workspace == workspace && !IS_VSTUCK(wwin)) {
|
||||
wWindowMove(wwin, wwin->frame_x + diff_x, wwin->frame_y + diff_y);
|
||||
adjust_flag = True;
|
||||
}
|
||||
}
|
||||
if (1) { /* if delay */
|
||||
delay_configure.delay_count++;
|
||||
delay_configure.wwin = scr->focused_window;
|
||||
WMAddTimerHandler(200, (WMCallback *) sendConfigureNotify, &delay_configure);
|
||||
}
|
||||
|
||||
return adjust_flag;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void switchWSCommand(WMenu * menu, WMenuEntry * entry)
|
||||
{
|
||||
wWorkspaceChange(menu->frame->screen_ptr, (long)entry->clientdata);
|
||||
|
||||
Reference in New Issue
Block a user