diff --git a/kernel/trunk/core/taskman.inc b/kernel/trunk/core/taskman.inc index cb58187a72..2f72ed746f 100644 --- a/kernel/trunk/core/taskman.inc +++ b/kernel/trunk/core/taskman.inc @@ -72,6 +72,7 @@ proc fs_execute slot_base dd ? file_base dd ? file_size dd ? + handle dd ? ;temp. for default cursor handle for curr. thread ;app header data hdr_cmdline dd ? ;0x00 hdr_path dd ? ;0x04 @@ -82,7 +83,13 @@ proc fs_execute endl pushad - call set_default_cursor_clock + + pushad + stdcall set_cursor, [def_cursor_clock] + mov [handle], eax + mov [redrawmouse_unconditional], 1 + call __sys_draw_pointer + popad mov [flags], edx @@ -114,8 +121,8 @@ proc fs_execute .bigfilename: popad mov eax, -ERROR_FILE_NOT_FOUND - call set_default_cursor_arrow - ret + + jmp .final .namecopied: @@ -240,8 +247,9 @@ end if xor ebx, ebx mov [application_table_status], ebx;unlock application_table_status mutex mov eax, [process_number];set result - call set_default_cursor_arrow - ret + + jmp .final + .failed: mov eax, [save_cr3] call set_cr3 @@ -252,7 +260,12 @@ end if xor eax, eax mov [application_table_status], eax mov eax, esi - call set_default_cursor_arrow +.final: + pushad + stdcall set_cursor, [handle] + mov [redrawmouse_unconditional], 1 + call __sys_draw_pointer + popad ret endp diff --git a/kernel/trunk/gui/window.inc b/kernel/trunk/gui/window.inc index f959137cb1..76c69959a4 100644 --- a/kernel/trunk/gui/window.inc +++ b/kernel/trunk/gui/window.inc @@ -1578,7 +1578,10 @@ window._.sys_set_window: ;///////////////////////////////////////////////////// test [edi + WDATA.fl_wdrawn], 1 jnz .set_client_box or [edi + WDATA.fl_wdrawn], 1 - +; After first draw_window we need redraw mouse necessarily! +; Otherwise the user can see cursor specified by f.37.5 from another window. +; He will be really unhappy! He is terrible in rage - usually he throws stones! + mov [redrawmouse_unconditional], 1 ; NOTE: commented out since doesn't provide necessary functionality ; anyway, to be reworked ; mov eax, [timer_ticks] ; [0xfdf0] diff --git a/kernel/trunk/video/cursors.inc b/kernel/trunk/video/cursors.inc index 99e10af34f..a23bc07eec 100644 --- a/kernel/trunk/video/cursors.inc +++ b/kernel/trunk/video/cursors.inc @@ -1027,22 +1027,6 @@ align 4 mov [_display.move_cursor], eax ret ;------------------------------------------------------------------------------ -set_default_cursor_clock: - pushad - stdcall set_cursor, [def_cursor_clock] - mov [redrawmouse_unconditional], 1 - popad - call __sys_draw_pointer - ret -;------------------------------------------------------------------------------ -set_default_cursor_arrow: - pushad - stdcall set_cursor, [def_cursor] - mov [redrawmouse_unconditional], 1 - popad - call __sys_draw_pointer - ret -;------------------------------------------------------------------------------ align 4 def_arrow: file 'arrow.cur'