From c04947731537a722b7efe94ea0d7e56cbf21bf57 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 15 Sep 2020 18:32:49 +0200 Subject: Added window focus z-index --- apps/wm.c | 7 ++++++- kernel/Makefile | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/wm.c b/apps/wm.c index de9a1d7..df58e10 100644 --- a/apps/wm.c +++ b/apps/wm.c @@ -59,8 +59,13 @@ static void redraw_all() struct node *iterator = windows->head; do { struct window *win = iterator->data; - gui_win_on_win(&exchange, win, win->x, win->y); + if (win != focused) + gui_win_on_win(&exchange, win, win->x, win->y); } while ((iterator = iterator->next) != NULL); + + if (focused) + gui_win_on_win(&exchange, focused, focused->x, focused->y); + memcpy(direct.fb, exchange.fb, exchange.pitch * exchange.height); } } diff --git a/kernel/Makefile b/kernel/Makefile index 98c17a2..1487ae3 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -21,7 +21,8 @@ LD = ../cross/opt/bin/i686-elf-ld OC = ../cross/opt/bin/i686-elf-objcopy AS = nasm -CFLAGS = -Wall -Wextra -nostdlib -nostdinc -ffreestanding -fno-builtin -fno-asynchronous-unwind-tables -mno-red-zone -mgeneral-regs-only -mpreferred-stack-boundary=2 -std=c99 -m32 -pedantic-errors -Wl,-ekernel_main -I../libc/inc/ -Iinc/ -Dkernel -Ofast +# TODO: Fix -Ofast (probably some dumb memory overflow bug) +CFLAGS = -Wall -Wextra -nostdlib -nostdinc -ffreestanding -fno-builtin -fno-asynchronous-unwind-tables -mno-red-zone -mgeneral-regs-only -mpreferred-stack-boundary=2 -std=c99 -m32 -pedantic-errors -Wl,-ekernel_main -I../libc/inc/ -Iinc/ -Dkernel -O0 ASFLAGS = -f elf32 -- cgit v1.2.3