Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 9847 → Rev 9848

/kernel/trunk/const.inc
538,7 → 538,7
in_schedule LHEAD ;+236
counter_add dd ? ;+244 ; R
cpu_usage dd ? ;+248 ; R
dd ? ;+252
temp_cursor dd 0 ;+252 ; temporary place to save cursor
ends
 
assert sizeof.APPDATA = 256
/kernel/trunk/data32.inc
400,6 → 400,10
 
def_cursor dd ?
def_cursor_clock dd ?
def_cursor_hresize dd ?
def_cursor_vresize dd ?
def_cursor_dresize1 dd ?
def_cursor_dresize2 dd ?
current_cursor dd ?
hw_cursor dd ?
cur_saved_base dd ?
/kernel/trunk/gui/mouse.inc
338,6 → 338,89
; Called when cursor has been moved
;> eax = old x coord
;> ebx = old y coord
push eax ebx
 
call mouse._.find_sys_window_under_cursor
call mouse._.check_sys_window_actions
 
cmp al, mouse.WINDOW_RESIZE_SW_FLAG
jne .not_sw
; DEBUGF 1, "RESIZE SOUTH-WEST\n"
 
mov eax, [def_cursor_dresize2]
 
jmp .set_resizing_cursor
.not_sw:
cmp al, mouse.WINDOW_RESIZE_SE_FLAG
jne .not_se
; DEBUGF 1, "RESIZE SOUTH-EAST\n"
 
mov eax, [def_cursor_dresize1]
 
jmp .set_resizing_cursor
.not_se:
cmp al, mouse.WINDOW_RESIZE_W_FLAG
jne .not_w
; DEBUGF 1, "RESIZE WEST\n"
 
mov eax, [def_cursor_hresize]
 
jmp .set_resizing_cursor
.not_w:
cmp al, mouse.WINDOW_RESIZE_S_FLAG
jne .not_s
; DEBUGF 1, "RESIZE SOUTH\n"
 
mov eax, [def_cursor_vresize]
 
jmp .set_resizing_cursor
.not_s:
cmp al, mouse.WINDOW_RESIZE_E_FLAG
jne .not_in_resize_area
; DEBUGF 1, "RESIZE EAST\n"
 
mov eax, [def_cursor_hresize]
 
.set_resizing_cursor:
; change cursor to resizing cursor
shl esi, BSF sizeof.APPDATA
add esi, SLOT_BASE
; if resizing cursor we need (eax) isnt set already, set it
cmp eax, [esi + APPDATA.cursor]
je @f
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
cmp eax, [def_cursor_hresize]
je @f
cmp eax, [def_cursor_vresize]
je @f
cmp eax, [def_cursor_dresize1]
je @f
cmp eax, [def_cursor_dresize2]
je @f
 
mov [esi + APPDATA.temp_cursor], eax ; save prev cursor
 
@@:
jmp .end1
.not_in_resize_area:
shl esi, BSF sizeof.APPDATA
add esi, SLOT_BASE
mov eax, [esi + APPDATA.temp_cursor]
 
test eax, eax
jz .end1
; restore prev cursor
mov [esi + APPDATA.temp_cursor], 0
mov [esi + APPDATA.cursor], eax
 
.end1:
pop ebx eax
 
cmp [mouse.active_sys_button.pbid], 0
jnz .exit
 
/kernel/trunk/hid/mousedrv.inc
117,18 → 117,33
add eax, [_display.win_map]
movzx edx, byte [ebx + eax]
shl edx, BSF sizeof.APPDATA
mov esi, [SLOT_BASE + edx + APPDATA.cursor]
; edx - thread slot of window under cursor
mov esi, [SLOT_BASE + edx + APPDATA.cursor] ; cursor of window under cursor
 
; if cursor of window under cursor already equal to the
; current_cursor then just draw it
cmp esi, [current_cursor]
je .draw
 
; eax = thread slot of current active window
mov eax, [thread_count]
movzx eax, word [WIN_POS + eax*2]
shl eax, 8
shl eax, BSF sizeof.APPDATA
 
; window under cursor == active window ?
cmp eax, edx
je @F
je @F ; if yes then just draw cursor of app
 
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
 
; esi = cursor of active window:
mov esi, [SLOT_BASE + eax + APPDATA.cursor]
jmp .draw
 
.set_def_cursor:
mov esi, [def_cursor]
cmp esi, [current_cursor]
je .draw
/kernel/trunk/video/cursors.inc
1188,6 → 1188,15
je @f
mov [PUTPIXEL], edx
@@:
stdcall load_cursor, def_hresize, dword LOAD_FROM_MEM
mov [def_cursor_hresize], eax
stdcall load_cursor, def_vresize, dword LOAD_FROM_MEM
mov [def_cursor_vresize], eax
stdcall load_cursor, def_dresize1, dword LOAD_FROM_MEM
mov [def_cursor_dresize1], eax
stdcall load_cursor, def_dresize2, dword LOAD_FROM_MEM
mov [def_cursor_dresize2], eax
 
stdcall load_cursor, clock_arrow, dword LOAD_FROM_MEM
mov [def_cursor_clock], eax
stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM
1230,6 → 1239,22
file 'arrow.cur'
;------------------------------------------------------------------------------
align 4
def_hresize:
file 'hresize.cur'
;------------------------------------------------------------------------------
align 4
def_vresize:
file 'vresize.cur'
;------------------------------------------------------------------------------
align 4
def_dresize1:
file 'dresize1.cur'
;------------------------------------------------------------------------------
align 4
def_dresize2:
file 'dresize2.cur'
;------------------------------------------------------------------------------
align 4
clock_arrow:
file 'arrow_clock.cur'
;------------------------------------------------------------------------------
/kernel/trunk/video/dresize1.cur
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kernel/trunk/video/dresize2.cur
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kernel/trunk/video/hresize.cur
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kernel/trunk/video/vresize.cur
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property