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