aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMarvin Borner2020-11-29 18:43:31 +0100
committerMarvin Borner2020-11-29 18:43:31 +0100
commitcb9816c78f25ecc8736cd97c11c839a4c18bcf76 (patch)
tree8bacb607dc7eae0a6bb8691a759325a2b3a41270 /apps
parent727fd72e6a9b8a0ce44af1cf8648981092300ee7 (diff)
Fixed some things
I'm currently working on a huge commit, but it doesn't work.. WAIT AND SEE!
Diffstat (limited to 'apps')
-rw-r--r--apps/wm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/wm.c b/apps/wm.c
index a6d2567..04947a4 100644
--- a/apps/wm.c
+++ b/apps/wm.c
@@ -54,6 +54,13 @@ static struct context *new_context(struct context *ctx, u32 pid, int x, int y, u
static void remove_context(struct context *ctx)
{
assert(list_remove(contexts, list_first_data(contexts, ctx)));
+
+ if (!(ctx->flags & WF_RELATIVE)) {
+ if (context_count % 2 == 1)
+ MOUSE_SKIP--;
+ context_count--;
+ }
+
free(ctx->fb);
ctx->fb = NULL;
free(ctx);
@@ -198,7 +205,6 @@ static void handle_mouse(struct event_mouse *event)
if (mouse_y - focused->y > 0) {
focused->height = mouse_y - focused->y;
}
- /* redraw_all(); // TODO: Function to redraw one context */
}
mouse_pressed[1] = 1;
} else if (mod_pressed && mouse_pressed[1]) {