Subversion Repositories Kolibri OS

Rev

Rev 2430 | Rev 2436 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2430 Rev 2435
Line 67... Line 67...
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
69
include 'macros.inc'
69
include 'macros.inc'
Line 70... Line 70...
70
include 'struct.inc'
70
include 'struct.inc'
Line 71... Line 71...
71
 
71
 
Line 72... Line 72...
72
$Revision: 2430 $
72
$Revision: 2435 $
Line 1924... Line 1924...
1924
        cmp     [_display.select_cursor], 0
1924
        cmp     [_display.select_cursor], 0
1925
        je      @f
1925
        je      @f
1926
; restore default cursor before killing
1926
; restore default cursor before killing
1927
        pusha
1927
        pusha
1928
        mov     ecx, [current_slot]
1928
        mov     ecx, [current_slot]
1929
        mov     eax, [def_cursor]
-
 
1930
        mov     [ecx+APPDATA.cursor], eax
-
 
1931
 
-
 
1932
        movzx   eax, word [MOUSE_Y]
-
 
1933
        movzx   ebx, word [MOUSE_X]
-
 
1934
        mov     ecx, [Screen_Max_X]
-
 
1935
        inc     ecx
-
 
1936
        mul     ecx
-
 
1937
        add     eax, [_WinMapAddress]
-
 
1938
        movzx   edx, byte [ebx+eax]
-
 
1939
        shl     edx, 8
-
 
1940
        mov     esi, [edx+SLOT_BASE+APPDATA.cursor]
-
 
1941
        push    esi
-
 
1942
        call    [_display.select_cursor]
1929
        call    restore_default_cursor_before_killing
1943
        mov     [current_cursor], esi
-
 
1944
        popa
1930
        popa
1945
@@:
1931
@@:
1946
;--------------------------------------
1932
;--------------------------------------
1947
        mov     ecx, [current_slot]
1933
        mov     ecx, [current_slot]
1948
        mov     eax, [ecx+APPDATA.tls_base]
1934
        mov     eax, [ecx+APPDATA.tls_base]
Line 1957... Line 1943...
1957
 
1943
 
1958
    waitterm:            ; wait here for termination
1944
    waitterm:            ; wait here for termination
1959
        mov     ebx, 100
1945
        mov     ebx, 100
1960
        call    delay_hs
1946
        call    delay_hs
-
 
1947
        jmp     waitterm
-
 
1948
;------------------------------------------------------------------------------
-
 
1949
restore_default_cursor_before_killing:
-
 
1950
        mov     eax, [def_cursor]
Line -... Line 1951...
-
 
1951
        mov     [ecx+APPDATA.cursor], eax
-
 
1952
 
-
 
1953
        movzx   eax, word [MOUSE_Y]
-
 
1954
        movzx   ebx, word [MOUSE_X]
-
 
1955
        mov     ecx, [Screen_Max_X]
-
 
1956
        inc     ecx
-
 
1957
        mul     ecx
-
 
1958
        add     eax, [_WinMapAddress]
-
 
1959
        movzx   edx, byte [ebx+eax]
-
 
1960
        shl     edx, 8
-
 
1961
        mov     esi, [edx+SLOT_BASE+APPDATA.cursor]
-
 
1962
        push    esi
-
 
1963
        call    [_display.select_cursor]
-
 
1964
        mov     [current_cursor], esi
1961
        jmp     waitterm
1965
        ret
1962
 
1966
;------------------------------------------------------------------------------
1963
iglobal
1967
iglobal
1964
align 4
1968
align 4
1965
sys_system_table:
1969
sys_system_table:
Line 2033... Line 2037...
2033
        je      @f
2037
        je      @f
2034
; restore default cursor before killing
2038
; restore default cursor before killing
2035
        pusha
2039
        pusha
2036
        mov     ecx, [esp+32]
2040
        mov     ecx, [esp+32]
2037
        shl     ecx, 8
2041
        shl     ecx, 8
2038
        mov     eax, [def_cursor]
-
 
2039
        mov     [ecx+SLOT_BASE+APPDATA.cursor], eax
-
 
2040
 
-
 
2041
        movzx   eax, word [MOUSE_Y]
-
 
2042
        movzx   ebx, word [MOUSE_X]
-
 
2043
        mov     ecx, [Screen_Max_X]
2042
        add     ecx, SLOT_BASE
2044
        inc     ecx
-
 
2045
        mul     ecx
-
 
2046
        add     eax, [_WinMapAddress]
-
 
2047
        movzx   edx, byte [ebx+eax]
-
 
2048
        shl     edx, 8
-
 
2049
        mov     esi, [edx+SLOT_BASE+APPDATA.cursor]
-
 
2050
        push    esi
-
 
2051
        call    [_display.select_cursor]
2043
        call    restore_default_cursor_before_killing
2052
        mov     [current_cursor], esi
-
 
2053
        popa
2044
        popa
2054
@@:
2045
@@:
2055
        add     esp, 4
2046
        add     esp, 4
2056
;--------------------------------------
2047
;--------------------------------------
2057
     ;call MEM_Heap_Lock      ;guarantee that process isn't working with heap
2048
     ;call MEM_Heap_Lock      ;guarantee that process isn't working with heap