mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
I believe we redraw the border in too many cases; likely a leftover from
the cc->pwin days - don't redraw on every unhide, resize, and mouse move/resize Expose event (note, all Expose events trigger a redraw anyway). Tested with some finicky X apps I could think of, though I'm sure others will find more - if so, and they 'lose' the border, please report!
This commit is contained in:
parent
a70b2d81af
commit
083a023f2c
3
client.c
3
client.c
@ -398,8 +398,6 @@ client_resize(struct client_ctx *cc, int reset)
|
|||||||
xu_ewmh_set_net_wm_state(cc);
|
xu_ewmh_set_net_wm_state(cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
client_draw_border(cc);
|
|
||||||
|
|
||||||
XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,
|
XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,
|
||||||
cc->geom.y, cc->geom.w, cc->geom.h);
|
cc->geom.y, cc->geom.w, cc->geom.h);
|
||||||
client_config(cc);
|
client_config(cc);
|
||||||
@ -495,7 +493,6 @@ client_unhide(struct client_ctx *cc)
|
|||||||
cc->flags &= ~CLIENT_HIDDEN;
|
cc->flags &= ~CLIENT_HIDDEN;
|
||||||
cc->state = NormalState;
|
cc->state = NormalState;
|
||||||
xu_set_wm_state(cc->win, cc->state);
|
xu_set_wm_state(cc->win, cc->state);
|
||||||
client_draw_border(cc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
10
mousefunc.c
10
mousefunc.c
@ -88,12 +88,9 @@ mousefunc_client_resize(struct client_ctx *cc, void *arg)
|
|||||||
mousefunc_sweep_draw(cc);
|
mousefunc_sweep_draw(cc);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev);
|
XMaskEvent(X_Dpy, MOUSEMASK, &ev);
|
||||||
|
|
||||||
switch (ev.type) {
|
switch (ev.type) {
|
||||||
case Expose:
|
|
||||||
client_draw_border(cc);
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
mousefunc_sweep_calc(cc, x, y,
|
mousefunc_sweep_calc(cc, x, y,
|
||||||
ev.xmotion.x_root, ev.xmotion.y_root);
|
ev.xmotion.x_root, ev.xmotion.y_root);
|
||||||
@ -143,12 +140,9 @@ mousefunc_client_move(struct client_ctx *cc, void *arg)
|
|||||||
xu_ptr_getpos(cc->win, &px, &py);
|
xu_ptr_getpos(cc->win, &px, &py);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev);
|
XMaskEvent(X_Dpy, MOUSEMASK, &ev);
|
||||||
|
|
||||||
switch (ev.type) {
|
switch (ev.type) {
|
||||||
case Expose:
|
|
||||||
client_draw_border(cc);
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
cc->geom.x = ev.xmotion.x_root - px - cc->bwidth;
|
cc->geom.x = ev.xmotion.x_root - px - cc->bwidth;
|
||||||
cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
|
cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user