forked from KolibriOS/kolibrios
Bug fixes, change the values of constants window position relative to the other.
git-svn-id: svn://kolibrios.org@5865 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
9446cca9f2
commit
04b4f40454
@ -1190,10 +1190,10 @@ dd 1675
|
|||||||
* eax = 1 - успех
|
* eax = 1 - успех
|
||||||
|
|
||||||
Константы положения окна относительно других окон:
|
Константы положения окна относительно других окон:
|
||||||
|
ZPOS_DESKTOP = -2 - на самом заднем плане
|
||||||
|
ZPOS_ALWAYS_BACK = -1 - позади всех окон
|
||||||
ZPOS_NORMAL = 0 - обычное
|
ZPOS_NORMAL = 0 - обычное
|
||||||
ZPOS_ALWAYS_BACK = 1 - позади всех окон
|
ZPOS_ALWAYS_TOP = 1 - поверх всех окон
|
||||||
ZPOS_DESKTOP = 2 - на самом заднем плане
|
|
||||||
ZPOS_ALWAYS_TOP = 3 - поверх всех окон
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
==================== Функция 20 - интерфейс MIDI. ====================
|
==================== Функция 20 - интерфейс MIDI. ====================
|
||||||
|
@ -1189,10 +1189,10 @@ Returned value:
|
|||||||
* eax = 1 - success
|
* eax = 1 - success
|
||||||
|
|
||||||
Constant position of the window relative to other windows:
|
Constant position of the window relative to other windows:
|
||||||
|
ZPOS_DESKTOP = -2 - on the background
|
||||||
|
ZPOS_ALWAYS_BACK = -1 - behind all the windows
|
||||||
ZPOS_NORMAL = 0 - normal
|
ZPOS_NORMAL = 0 - normal
|
||||||
ZPOS_ALWAYS_BACK = 1 - behind all the windows
|
ZPOS_ALWAYS_TOP = 1 - on top of all windows
|
||||||
ZPOS_DESKTOP = 2 - on the background
|
|
||||||
ZPOS_ALWAYS_TOP = 3 - on top of all windows
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
==================== Function 20 - MIDI interface. ===================
|
==================== Function 20 - MIDI interface. ===================
|
||||||
|
@ -439,12 +439,7 @@ align 4
|
|||||||
pop ecx eax
|
pop ecx eax
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
iglobal
|
|
||||||
win_zmodi db ZPOS_DESKTOP,\
|
|
||||||
ZPOS_ALWAYS_BACK,\
|
|
||||||
ZPOS_NORMAL,\
|
|
||||||
ZPOS_ALWAYS_TOP
|
|
||||||
endg
|
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
calculatescreen: ;/////////////////////////////////////////////////////////////
|
calculatescreen: ;/////////////////////////////////////////////////////////////
|
||||||
@ -474,7 +469,7 @@ calculatescreen: ;/////////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
push edx ecx ebx eax
|
push edx ecx ebx eax
|
||||||
|
|
||||||
mov dword[esp+14], 0
|
mov dword[esp+10h], ZPOS_DESKTOP
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.layout:
|
.layout:
|
||||||
@ -493,8 +488,7 @@ align 4
|
|||||||
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
jnz .skip_window
|
jnz .skip_window
|
||||||
|
|
||||||
mov eax, [esp+14]
|
mov eax, [esp+10h]
|
||||||
mov al, [eax+win_zmodi]
|
|
||||||
cmp [edi + WDATA.z_modif], al
|
cmp [edi + WDATA.z_modif], al
|
||||||
jne .skip_window
|
jne .skip_window
|
||||||
|
|
||||||
@ -548,9 +542,9 @@ align 4
|
|||||||
dec ebp
|
dec ebp
|
||||||
jnz .next_window
|
jnz .next_window
|
||||||
;---------------------------------------------
|
;---------------------------------------------
|
||||||
inc dword[esp+14]
|
inc dword[esp+10h]
|
||||||
cmp dword[esp+14], ZPOS_ALWAYS_TOP
|
cmp dword[esp+10h], ZPOS_ALWAYS_TOP
|
||||||
jbe .layout
|
jle .layout
|
||||||
;---------------------------------------------
|
;---------------------------------------------
|
||||||
mov esi, [TASK_COUNT]
|
mov esi, [TASK_COUNT]
|
||||||
movzx edi, word[WIN_POS + esi * 2]
|
movzx edi, word[WIN_POS + esi * 2]
|
||||||
@ -1012,7 +1006,7 @@ waredraw: ;////////////////////////////////////////////////////////////////////
|
|||||||
movzx esi, word[WIN_POS + edi * 2]
|
movzx esi, word[WIN_POS + edi * 2]
|
||||||
call window._.set_screen
|
call window._.set_screen
|
||||||
|
|
||||||
call window._.set_top_wnd ;Fantomer
|
call window._.set_top_wnd
|
||||||
|
|
||||||
inc [_display.mask_seqno]
|
inc [_display.mask_seqno]
|
||||||
popad
|
popad
|
||||||
@ -2432,9 +2426,9 @@ window._.get_rect: ;/////////////////////////////////////////////////////
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
window._.set_top_wnd: ;////////////////////////////////////////////////////////
|
window._.redraw_top_wnd: ;////////////////////////////////////////////////////////
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;? updates all windows one above the window
|
;? redraw all windows one above the window
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
;> eax = left
|
;> eax = left
|
||||||
;> ebx = top
|
;> ebx = top
|
||||||
@ -2443,13 +2437,25 @@ window._.set_top_wnd: ;////////////////////////////////////////////////////////
|
|||||||
;> esi = process number
|
;> esi = process number
|
||||||
;! corrupted edi
|
;! corrupted edi
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
movzx edi, word[WIN_POS + esi * 2]
|
push 0
|
||||||
shl edi, 5
|
jmp window._.set_top_wnd.go
|
||||||
cmp [edi + window_data + WDATA.z_modif], ZPOS_ALWAYS_TOP
|
|
||||||
jne @f
|
|
||||||
ret
|
|
||||||
@@:
|
|
||||||
|
|
||||||
|
align 4
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
window._.set_top_wnd: ;////////////////////////////////////////////////////////
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
;? call set_screen for all windows one above the window
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
;> eax = left
|
||||||
|
;> ebx = top
|
||||||
|
;> ecx = right
|
||||||
|
;> edx = bottom
|
||||||
|
;> esi = process number
|
||||||
|
;! corrupted edi
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
push 1
|
||||||
|
.go:
|
||||||
push esi
|
push esi
|
||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
@ -2459,12 +2465,16 @@ window._.set_top_wnd: ;////////////////////////////////////////////////////////
|
|||||||
cmp ebp, 1
|
cmp ebp, 1
|
||||||
jbe .exit
|
jbe .exit
|
||||||
|
|
||||||
|
shl esi, 5
|
||||||
|
cmp [esi + window_data + WDATA.z_modif], ZPOS_ALWAYS_TOP
|
||||||
|
je .exit
|
||||||
|
|
||||||
push eax ;for num layout
|
push eax ;for num layout
|
||||||
push edx ecx ebx eax
|
push edx ecx ebx eax
|
||||||
|
|
||||||
movzx eax, byte [edi + window_data + WDATA.z_modif]
|
movsx eax, byte [esi + window_data + WDATA.z_modif]
|
||||||
inc eax
|
inc eax
|
||||||
mov dword[esp+14], eax
|
mov dword[esp+10h], eax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.layout:
|
.layout:
|
||||||
@ -2483,8 +2493,7 @@ align 4
|
|||||||
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
|
||||||
jnz .skip_window
|
jnz .skip_window
|
||||||
|
|
||||||
mov eax, [esp+14]
|
mov eax, [esp+10h]
|
||||||
mov al, [eax+win_zmodi]
|
|
||||||
cmp [edi + WDATA.z_modif], al
|
cmp [edi + WDATA.z_modif], al
|
||||||
jne .skip_window
|
jne .skip_window
|
||||||
|
|
||||||
@ -2527,12 +2536,17 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
|
cmp dword[esp+32], 0
|
||||||
|
je .set_fl_redraw
|
||||||
|
|
||||||
push esi
|
push esi
|
||||||
movzx esi, word[WIN_POS + esi * 2]
|
movzx esi, word[WIN_POS + esi * 2]
|
||||||
call window._.set_screen
|
call window._.set_screen
|
||||||
pop esi
|
pop esi
|
||||||
|
jmp @f
|
||||||
|
.set_fl_redraw:
|
||||||
mov [edi + WDATA.fl_redraw], 1 ;set redraw flag
|
mov [edi + WDATA.fl_redraw], 1 ;set redraw flag
|
||||||
|
@@:
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.skip_window:
|
.skip_window:
|
||||||
@ -2540,9 +2554,9 @@ align 4
|
|||||||
dec ebp
|
dec ebp
|
||||||
jnz .next_window
|
jnz .next_window
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
inc dword[esp+14]
|
inc dword[esp+10h]
|
||||||
cmp dword[esp+14], ZPOS_ALWAYS_TOP
|
cmp byte[esp+10h], ZPOS_ALWAYS_TOP
|
||||||
jbe .layout
|
jle .layout
|
||||||
;-------------------------------------
|
;-------------------------------------
|
||||||
|
|
||||||
pop eax ebx ecx edx
|
pop eax ebx ecx edx
|
||||||
@ -2555,6 +2569,7 @@ align 4
|
|||||||
popfd
|
popfd
|
||||||
pop esi
|
pop esi
|
||||||
|
|
||||||
|
add esp, 4 ;dword for 0/1 - set_screen/fl_redraw
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
@ -2403,7 +2403,7 @@ sysfn_activate: ; 18.3 = ACTIVATE WINDOW
|
|||||||
.nowindowactivate:
|
.nowindowactivate:
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4 ;Fantomer
|
align 4
|
||||||
sysfn_zmodif:
|
sysfn_zmodif:
|
||||||
;18,25,1 - get z_modif
|
;18,25,1 - get z_modif
|
||||||
;18,25,2 - set z_modif
|
;18,25,2 - set z_modif
|
||||||
@ -2413,41 +2413,38 @@ sysfn_zmodif:
|
|||||||
;1: eax = z_modif
|
;1: eax = z_modif
|
||||||
;2: eax=0(fail),1(success) for set z_modif
|
;2: eax=0(fail),1(success) for set z_modif
|
||||||
|
|
||||||
xor eax, eax
|
|
||||||
|
|
||||||
cmp edx, -1
|
cmp edx, -1
|
||||||
jne @f
|
jne @f
|
||||||
mov edx, [CURRENT_TASK]
|
mov edx, [CURRENT_TASK]
|
||||||
@@:
|
@@:
|
||||||
cmp edx, [TASK_COUNT]
|
cmp edx, [TASK_COUNT]
|
||||||
ja .exit
|
ja .fail
|
||||||
cmp edx, 1
|
cmp edx, 1
|
||||||
je .exit
|
je .fail
|
||||||
|
|
||||||
|
|
||||||
|
mov eax, edx
|
||||||
shl edx, 5
|
shl edx, 5
|
||||||
|
|
||||||
cmp [edx + CURRENT_TASK + TASKDATA.state], 9
|
cmp [edx + CURRENT_TASK + TASKDATA.state], 9
|
||||||
je .exit
|
je .fail
|
||||||
|
|
||||||
cmp ecx, 1
|
cmp ecx, 1
|
||||||
jnz .set_zmod
|
jnz .set_zmod
|
||||||
|
|
||||||
mov al, [edx + window_data + WDATA.z_modif]
|
mov al, [edx + window_data + WDATA.z_modif]
|
||||||
|
|
||||||
jmp .exit
|
jmp .exit
|
||||||
align 4
|
|
||||||
.set_zmod:
|
.set_zmod:
|
||||||
cmp ecx, 2
|
cmp ecx, 2
|
||||||
jnz .exit
|
jnz .fail
|
||||||
|
|
||||||
mov eax, esi
|
mov ebx, esi
|
||||||
mov esi, edx
|
mov esi, eax
|
||||||
|
|
||||||
cmp al, ZPOS_ALWAYS_TOP
|
cmp bl, ZPOS_ALWAYS_TOP
|
||||||
ja .exit
|
jg .fail
|
||||||
|
|
||||||
mov [edx + window_data + WDATA.z_modif], al
|
mov [edx + window_data + WDATA.z_modif], bl
|
||||||
|
|
||||||
mov eax, [edx + window_data + WDATA.box.left]
|
mov eax, [edx + window_data + WDATA.box.left]
|
||||||
mov ebx, [edx + window_data + WDATA.box.top]
|
mov ebx, [edx + window_data + WDATA.box.top]
|
||||||
@ -2455,10 +2452,18 @@ align 4
|
|||||||
mov edx, [edx + window_data + WDATA.box.height]
|
mov edx, [edx + window_data + WDATA.box.height]
|
||||||
add ecx, eax
|
add ecx, eax
|
||||||
add edx, ebx
|
add edx, ebx
|
||||||
|
call window._.set_screen
|
||||||
call window._.set_top_wnd
|
call window._.set_top_wnd
|
||||||
|
call window._.redraw_top_wnd
|
||||||
|
|
||||||
|
shl esi, 5
|
||||||
|
mov [esi + window_data + WDATA.fl_redraw], 1
|
||||||
|
|
||||||
|
|
||||||
mov eax, 1
|
mov eax, 1
|
||||||
align 4
|
jmp .exit
|
||||||
|
.fail:
|
||||||
|
xor eax, eax
|
||||||
.exit:
|
.exit:
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
|
@ -76,10 +76,10 @@ TSTATE_TERMINATING = 4
|
|||||||
TSTATE_WAITING = 5
|
TSTATE_WAITING = 5
|
||||||
TSTATE_FREE = 9
|
TSTATE_FREE = 9
|
||||||
|
|
||||||
|
ZPOS_DESKTOP = -2
|
||||||
|
ZPOS_ALWAYS_BACK = -1
|
||||||
ZPOS_NORMAL = 0
|
ZPOS_NORMAL = 0
|
||||||
ZPOS_ALWAYS_BACK = 1
|
ZPOS_ALWAYS_TOP = 1 ;ZPOS_ALWAYS_TOP is always last and has max number!
|
||||||
ZPOS_DESKTOP = 2
|
|
||||||
ZPOS_ALWAYS_TOP = 3 ;ZPOS_ALWAYS_TOP is always last and has max number!
|
|
||||||
; structures definition
|
; structures definition
|
||||||
struct WDATA
|
struct WDATA
|
||||||
box BOX
|
box BOX
|
||||||
|
Loading…
Reference in New Issue
Block a user