/kernel/branches/Kolibri-A/trunk/gui/mouse.inc |
---|
378,9 → 378,11 |
mov eax, [mouse.state.pos.x] |
sub eax, [mouse.active_sys_window.delta.x] |
and al, 0xFC ; <<<<<<<<<<<<<<<<<<< |
mov [mouse.active_sys_window.new_box.left], eax |
mov eax, [mouse.state.pos.y] |
sub eax, [mouse.active_sys_window.delta.y] |
and al, 0xFE ; <<<<<<<<<<<<<<<<<<< |
mov [mouse.active_sys_window.new_box.top], eax |
mov eax, [mouse.active_sys_window.new_box.left] |
411,15 → 413,16 |
mov eax, [mouse.state.pos.x] |
sub eax, [mouse.active_sys_window.delta.x] |
and al, 0xFC ; <<<<<<<<<<<<<<<<<<< |
mov [mouse.active_sys_window.new_box.left], eax |
sub eax, [mouse.active_sys_window.old_box.left] |
sub [mouse.active_sys_window.new_box.width], eax |
mov eax, [mouse.active_sys_window.new_box.width] |
sub eax, 127 |
sub eax, 128 |
jge @f |
add [mouse.active_sys_window.new_box.left], eax |
mov [mouse.active_sys_window.new_box.width], 127 |
mov [mouse.active_sys_window.new_box.width], 128 |
@@: mov eax, [mouse.active_sys_window.new_box.left] |
or eax, eax |
jge .check_resize_s |
434,6 → 437,7 |
mov eax, [mouse.state.pos.y] |
add eax, [mouse.active_sys_window.delta.y] |
sub eax, [mouse.active_sys_window.old_box.top] |
and al, 0xFC ; <<<<<<<<<<<<<<<<<<< |
mov [mouse.active_sys_window.new_box.height], eax |
push eax |
466,12 → 470,13 |
mov eax, [mouse.state.pos.x] |
add eax, [mouse.active_sys_window.delta.x] |
sub eax, [mouse.active_sys_window.old_box.left] |
and al, 0xFC ; <<<<<<<<<<<<<<<<<<< |
mov [mouse.active_sys_window.new_box.width], eax |
mov eax, [mouse.active_sys_window.new_box.width] |
cmp eax, 127 |
cmp eax, 128 |
jge @f |
mov eax, 127 |
mov eax, 128 |
mov [mouse.active_sys_window.new_box.width], eax |
@@: add eax, [mouse.active_sys_window.new_box.left] |
cmp eax, [Screen_Max_X] |
701,4 → 706,4 |
ret |
diff16 "mouse code end ",0,$ |
diff16 "mouse code size",mouse_check_events,$ |
diff10 "mouse code size",mouse_check_events,$ |
/kernel/branches/Kolibri-A/trunk/gui/window.inc |
---|
328,15 → 328,19 |
cmp ebx, -1 |
jne @f |
mov ebx, [edi + WDATA.box.left] |
and bl, 0xFC |
@@: cmp ecx, -1 |
jne @f |
mov ecx, [edi + WDATA.box.top] |
and cl, 0xFE |
@@: cmp edx, -1 |
jne @f |
mov edx, [edi + WDATA.box.width] |
and dl, 0xFC |
@@: cmp esi, -1 |
jne @f |
mov esi, [edi + WDATA.box.height] |
and esi, 0xFFFFFFFE |
@@: push esi edx ecx ebx |
mov eax, esp |
344,14 → 348,6 |
call window._.set_window_box |
add esp, BOX.sizeof |
; NOTE: do we really need this? to be reworked |
; mov byte[DONT_DRAW_MOUSE], 0 ; mouse pointer |
; mov byte[MOUSE_BACKGROUND], 0 ; no mouse under |
; mov byte[MOUSE_DOWN], 0 ; react to mouse up/down |
; NOTE: do we really need this? to be reworked |
; call [draw_pointer] |
.exit: |
ret |
519,8 → 515,10 |
mov eax, [edi + WDATA.box.width] |
sub eax, ebx |
jle @f |
and bl, 0xFC ; <<<<<<< |
mov [edi + WDATA.box.width], ebx |
@@: sub ebx, [edi + WDATA.box.width] |
and bl, 0xFC ; <<<<<<< |
mov [edi + WDATA.box.left], ebx |
.fix_vertical: |
532,8 → 530,10 |
mov eax, [edi + WDATA.box.height] |
sub eax, ebx |
jle @f |
and bl, 0xFE ; <<<<<<< |
mov [edi + WDATA.box.height], ebx |
@@: sub ebx, [edi + WDATA.box.height] |
and bl, 0xFE ; <<<<<<< |
mov [edi + WDATA.box.top], ebx |
jmp .fix_client_box |
555,7 → 555,8 |
call window._.set_window_clientbox |
add edi, WDATA.sizeof |
loop .next_window |
dec ecx |
jne .next_window ; <<<<<<<<<<< |
.exit: |
ret |
1454,7 → 1455,9 |
movzx eax, cx |
mov [edi + WDATA.box.height], eax |
sar ebx, 16 |
and bl, 0xFC ; <<<<<<<< |
sar ecx, 16 |
and cl, 0xFE ; <<<<<<<< |
mov [edi + WDATA.box.left], ebx |
mov [edi + WDATA.box.top], ecx |
1673,10 → 1676,11 |
; get WinMap start |
push esi |
mov edi, [Screen_Max_X] |
inc edi |
mov edi, [_WinMapWidth] |
mov esi, edi |
imul edi, ebx |
shr eax, 1 |
shr eax, 1 |
add edi, eax |
add edi, [_WinMapAddress] |
pop eax |
1715,12 → 1719,13 |
; get WinMap start -> ebp |
push eax |
mov eax, [Screen_Max_X] ; screen_sx |
inc eax |
mov eax, [_WinMapWidth] ; <<<< |
imul eax, ebx |
add eax, [esp] |
add eax, [_WinMapAddress] |
mov ebp, eax |
mov ebp, [esp] |
shr ebp, 1 |
shr ebp, 1 |
add ebp, eax |
add ebp, [_WinMapAddress] |
mov edi, [edi + APPDATA.wnd_shape] |
pop eax |
2085,4 → 2090,4 |
ret |
diff16 "window code end",0,$ |
diff16 "window.inc size",syscall_draw_window,$ |
diff10 "window.inc size",syscall_draw_window,$ |