Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1505 → Rev 1689

/kernel/branches/Kolibri-A/trunk/gui/event.inc
7,6 → 7,13
 
$Revision$
 
WINDOW_MOVE_AND_RESIZE_FLAGS = \
mouse.WINDOW_RESIZE_N_FLAG + \
mouse.WINDOW_RESIZE_W_FLAG + \
mouse.WINDOW_RESIZE_S_FLAG + \
mouse.WINDOW_RESIZE_E_FLAG + \
mouse.WINDOW_MOVE_FLAG
 
uglobal
align 4
event_start dd ?
445,7 → 452,7
xor eax,eax
ret
.IRQ:
;TODO: ñäåëàòü òàê æå, êàê è äëÿ FlagAutoReset (BgrRedraw,Mouse,IPC,Stack,Debug)
;TODO: same thing as done for FlagAutoReset (BgrRedraw,Mouse,IPC,Stack,Debug)
mov edx,[irq_owner+eax*4-64] ; eax==16+irq
cmp edx,[edi+TASKDATA.pid]
jne .loop
460,7 → 467,8
push eax
; If the window is captured and moved by the user, then no mouse events!!!
mov al, [mouse.active_sys_window.action]
test al, mouse.WINDOW_MOVE_FLAG
and al, WINDOW_MOVE_AND_RESIZE_FLAGS
test al, al
pop eax
jnz .loop
@@:
/kernel/branches/Kolibri-A/trunk/gui/mouse.inc
5,7 → 5,7
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
$Revision: -1 $
$Revision: 1532$
 
include 'mousepointer.inc'
 
/kernel/branches/Kolibri-A/trunk/gui/window.inc
319,6 → 319,9
shl edi, 5
add edi, window_data
 
test [edi + WDATA.fl_wdrawn], 1
jz .exit
 
test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED
jnz .exit
 
392,6 → 395,7
;------------------------------------------------------------------------------
;? <description>
;------------------------------------------------------------------------------
mov byte [window_data + 0x20 + WDATA.cl_titlebar + 3], 1 ; desktop is not movable
push eax ecx
xor eax, eax
mov ecx, WIN_STACK
1036,10 → 1040,10
add edi, window_data
 
; can window change its height?
; only types 2 and 3 can be resized
mov dl, [edi + WDATA.fl_wstyle]
and dl, 0x0f
cmp dl, 0x04
je .exit
test dl, 2
jz .exit
 
; toggle normal/maximized window state
mov bl, [edi + WDATA.fl_wstate]
1222,30 → 1226,33
push eax ebx
 
; TODO: do we really need `draw_limits`?
; Yes, they are used by background drawing code.
mov ecx, [eax + BOX.left]
mov edx, [ebx + BOX.left]
cmp ecx, edx
jle @f
xchg ecx, edx
mov ecx, edx
@@: mov [draw_limits.left], ecx
mov ecx, [eax + BOX.width]
cmp ecx, [ebx + BOX.width]
mov ecx, [eax + BOX.left]
add ecx, [eax + BOX.width]
add edx, [ebx + BOX.width]
cmp ecx, edx
jae @f
mov ecx, [ebx + BOX.width]
@@: add ecx, edx
mov [draw_limits.right], ecx
mov ecx, edx
@@: mov [draw_limits.right], ecx
mov ecx, [eax + BOX.top]
mov edx, [ebx + BOX.top]
cmp ecx, edx
jle @f
xchg ecx, edx
mov ecx, edx
@@: mov [draw_limits.top], ecx
mov ecx, [eax + BOX.height]
cmp ecx, [ebx + BOX.height]
mov ecx, [eax + BOX.top]
add ecx, [eax + BOX.height]
add edx, [ebx + BOX.height]
cmp ecx, edx
jae @f
mov ecx, [ebx + BOX.height]
@@: add ecx, edx
mov [draw_limits.bottom], ecx
mov ecx, edx
@@: mov [draw_limits.bottom], ecx
 
; recalculate screen buffer at old position
push ebx
1433,6 → 1440,7
; was it already defined before?
test [edi + WDATA.fl_wdrawn], 1
jnz .set_client_box
or [edi + WDATA.fl_wdrawn], 1
 
; NOTE: commented out since doesn't provide necessary functionality
; anyway, to be reworked