forked from KolibriOS/kolibrios
[KERNEL] Fix resizing cursors for window borders
git-svn-id: svn://kolibrios.org@9850 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
33ec897c11
commit
f717a55cc1
@ -343,6 +343,12 @@ mouse._.move_handler:
|
||||
call mouse._.find_sys_window_under_cursor
|
||||
call mouse._.check_sys_window_actions
|
||||
|
||||
; if now we are resizing the window, dont change the cursor
|
||||
mov bl, [mouse.active_sys_window.action]
|
||||
and bl, mouse.WINDOW_RESIZE_S_FLAG or mouse.WINDOW_RESIZE_W_FLAG or mouse.WINDOW_RESIZE_E_FLAG
|
||||
test bl, bl
|
||||
jnz .end1
|
||||
|
||||
cmp al, mouse.WINDOW_RESIZE_SW_FLAG
|
||||
jne .not_sw
|
||||
; DEBUGF 1, "RESIZE SOUTH-WEST\n"
|
||||
@ -382,6 +388,7 @@ mouse._.move_handler:
|
||||
mov eax, [def_cursor_hresize]
|
||||
|
||||
.set_resizing_cursor:
|
||||
; DEBUGF 1, ".set_resizing_cursor eax = %x\n", eax
|
||||
; change cursor to resizing cursor
|
||||
shl esi, BSF sizeof.APPDATA
|
||||
add esi, SLOT_BASE
|
||||
@ -390,6 +397,7 @@ mouse._.move_handler:
|
||||
cmp eax, [esi + APPDATA.cursor]
|
||||
je @f
|
||||
|
||||
; DEBUGF 1, "changing cursor to resizing\n"
|
||||
xchg eax, [esi + APPDATA.cursor] ; set resizing cursor, prev cursor goes to eax
|
||||
; save previous cursor (will be restored when we'll get out of the resizing area)
|
||||
; if we change resizing cursor to resizing cursor then dont update previous cursor
|
||||
@ -407,6 +415,8 @@ mouse._.move_handler:
|
||||
@@:
|
||||
jmp .end1
|
||||
.not_in_resize_area:
|
||||
; DEBUGF 1, ".not_in_resize_area\n"
|
||||
|
||||
shl esi, BSF sizeof.APPDATA
|
||||
add esi, SLOT_BASE
|
||||
mov eax, [esi + APPDATA.temp_cursor]
|
||||
|
@ -109,9 +109,6 @@ save_draw_mouse:
|
||||
push eax
|
||||
push ebx
|
||||
|
||||
; mov ecx, [Screen_Max_X]
|
||||
; inc ecx
|
||||
; mul ecx
|
||||
mov eax, [d_width_calc_area + eax*4]
|
||||
|
||||
add eax, [_display.win_map]
|
||||
@ -132,19 +129,29 @@ save_draw_mouse:
|
||||
|
||||
; window under cursor == active window ?
|
||||
cmp eax, edx
|
||||
je @F ; if yes then just draw cursor of app
|
||||
je @f
|
||||
|
||||
; check whether active window is being resized now:
|
||||
mov bl, [mouse.active_sys_window.action]
|
||||
and bl, mouse.WINDOW_RESIZE_S_FLAG or mouse.WINDOW_RESIZE_W_FLAG or mouse.WINDOW_RESIZE_E_FLAG
|
||||
test bl, bl
|
||||
jz .set_def_cursor ; if active window is not being resized now
|
||||
jz .active_isnt_resizing
|
||||
mov esi, [SLOT_BASE + eax + APPDATA.cursor] ; esi = cursor of active window, it is resizing cursor
|
||||
jmp @f
|
||||
.active_isnt_resizing:
|
||||
|
||||
; esi = cursor of active window:
|
||||
mov esi, [SLOT_BASE + eax + APPDATA.cursor]
|
||||
jmp .draw
|
||||
; if cursor of window under the cursor is resizing cursor then draw it.
|
||||
cmp esi, [def_cursor_hresize]
|
||||
je @f
|
||||
cmp esi, [def_cursor_vresize]
|
||||
je @f
|
||||
cmp esi, [def_cursor_dresize1]
|
||||
je @f
|
||||
cmp esi, [def_cursor_dresize2]
|
||||
je @f
|
||||
|
||||
.set_def_cursor:
|
||||
mov esi, [def_cursor]
|
||||
; set cursor of window under cursor
|
||||
mov esi, [SLOT_BASE + edx + APPDATA.cursor]
|
||||
cmp esi, [current_cursor]
|
||||
je .draw
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user