Skip to content

Commit 2a968dd

Browse files
author
di
committed
[WM] fix for window management navigation
1 parent d408c8a commit 2a968dd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/kernel_processes/windows/wincomp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
#include "ui/graphic_types.h"
33
#include "graph/tres.h"
44
#include "graph/graphics.h"
5-
#include "console/kio.h"
65
#include "math/math.h"
6+
#include "console/kio.h"
77

88
int_point current_win_offset = {};
99

1010
void new_managed_window(){
1111
draw_ctx *cur = gpu_get_ctx();
1212
create_window(10 - current_win_offset.x, 10 - current_win_offset.y, cur->width - 20, cur->height - 20);
13-
// global_win_offset.x = current_win_offset.x;
13+
global_win_offset.x = current_win_offset.x;
1414
current_win_offset.x -= cur->width;
1515
}
1616

@@ -22,8 +22,8 @@ void switch_focus(int8_t x, int8_t y){
2222
global_win_offset.x += cur->width * x;
2323
global_win_offset.y += cur->height * y;
2424

25-
global_win_offset.x = (((int32_t)(global_win_offset.x/cur->width))*cur->width);
26-
global_win_offset.y = (((int32_t)(global_win_offset.y/cur->height))*cur->height);
25+
global_win_offset.x = (((int32_t)(global_win_offset.x/(int32_t)cur->width))*cur->width);
26+
global_win_offset.y = (((int32_t)(global_win_offset.y/(int32_t)cur->height))*cur->height);
2727

2828
dirty_windows = true;
2929
}

0 commit comments

Comments
 (0)