Subversion Repositories Kolibri OS

Rev

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

Rev 1710 Rev 1859
Line 4... Line 4...
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
$Revision: 1710 $
9
$Revision: 1859 $
10
 
10
 
11
;==============================================================================
11
;==============================================================================
Line 326... Line 326...
326
        jnz     .exit
326
	jnz	.exit
Line 327... Line 327...
327
 
327
 
328
        cmp     ebx, -1
328
	cmp	ebx, -1
329
        jne     @f
329
	jne	@f
-
 
330
	mov	ebx, [edi + WDATA.box.left]
330
        mov     ebx, [edi + WDATA.box.left]
331
	and	bl, 0xFC
331
    @@: cmp     ecx, -1
332
    @@: cmp	ecx, -1
332
        jne     @f
333
	jne	@f
-
 
334
	mov	ecx, [edi + WDATA.box.top]
333
        mov     ecx, [edi + WDATA.box.top]
335
	and	cl, 0xFE
334
    @@: cmp     edx, -1
336
    @@: cmp	edx, -1
335
        jne     @f
337
	jne	@f
-
 
338
	mov	edx, [edi + WDATA.box.width]
336
        mov     edx, [edi + WDATA.box.width]
339
	and	dl, 0xFC
337
    @@: cmp     esi, -1
340
    @@: cmp	esi, -1
338
        jne     @f
341
	jne	@f
-
 
342
	mov	esi, [edi + WDATA.box.height]
Line 339... Line 343...
339
        mov     esi, [edi + WDATA.box.height]
343
	and	esi, 0xFFFFFFFE
340
 
344
 
341
    @@: push    esi edx ecx ebx
345
    @@: push	esi edx ecx ebx
342
        mov     eax, esp
346
	mov	eax, esp
343
        mov     bl, [edi + WDATA.fl_wstate]
347
	mov	bl, [edi + WDATA.fl_wstate]
Line 344... Line -...
344
        call    window._.set_window_box
-
 
345
        add     esp, BOX.sizeof
-
 
346
 
-
 
347
        ; NOTE: do we really need this? to be reworked
-
 
348
;       mov     byte[DONT_DRAW_MOUSE], 0 ; mouse pointer
-
 
349
;       mov     byte[MOUSE_BACKGROUND], 0 ; no mouse under
-
 
350
;       mov     byte[MOUSE_DOWN], 0 ; react to mouse up/down
-
 
351
 
-
 
352
        ; NOTE: do we really need this? to be reworked
348
	call	window._.set_window_box
353
;       call    [draw_pointer]
349
	add	esp, BOX.sizeof
Line 354... Line 350...
354
 
350
 
355
  .exit:
351
  .exit:
Line 517... Line 513...
517
        cmp     eax, ebx
513
	cmp	eax, ebx
518
        jle     .fix_vertical
514
	jle	.fix_vertical
519
        mov     eax, [edi + WDATA.box.width]
515
	mov	eax, [edi + WDATA.box.width]
520
        sub     eax, ebx
516
	sub	eax, ebx
521
        jle     @f
517
	jle	@f
-
 
518
	and	bl, 0xFC			; <<<<<<<
522
        mov     [edi + WDATA.box.width], ebx
519
	mov	[edi + WDATA.box.width], ebx
523
    @@: sub     ebx, [edi + WDATA.box.width]
520
    @@: sub	ebx, [edi + WDATA.box.width]
-
 
521
	and	bl, 0xFC			; <<<<<<<
524
        mov     [edi + WDATA.box.left], ebx
522
	mov	[edi + WDATA.box.left], ebx
Line 525... Line 523...
525
 
523
 
526
  .fix_vertical:
524
  .fix_vertical:
527
        mov     eax, [edi + WDATA.box.top]
525
	mov	eax, [edi + WDATA.box.top]
Line 530... Line 528...
530
        cmp     eax, ebx
528
	cmp	eax, ebx
531
        jle     .fix_client_box
529
	jle	.fix_client_box
532
        mov     eax, [edi + WDATA.box.height]
530
	mov	eax, [edi + WDATA.box.height]
533
        sub     eax, ebx
531
	sub	eax, ebx
534
        jle     @f
532
	jle	@f
-
 
533
	and	bl, 0xFE			; <<<<<<<
535
        mov     [edi + WDATA.box.height], ebx
534
	mov	[edi + WDATA.box.height], ebx
536
    @@: sub     ebx, [edi + WDATA.box.height]
535
    @@: sub	ebx, [edi + WDATA.box.height]
-
 
536
	and	bl, 0xFE			; <<<<<<<
537
        mov     [edi + WDATA.box.top], ebx
537
	mov	[edi + WDATA.box.top], ebx
538
        jmp     .fix_client_box
538
	jmp	.fix_client_box
Line 539... Line 539...
539
 
539
 
540
  .fix_maximized:
540
  .fix_maximized:
Line 553... Line 553...
553
 
553
 
554
  .fix_client_box:
554
  .fix_client_box:
Line 555... Line 555...
555
        call    window._.set_window_clientbox
555
	call	window._.set_window_clientbox
-
 
556
 
556
 
557
	add	edi, WDATA.sizeof
Line 557... Line 558...
557
        add     edi, WDATA.sizeof
558
	dec	ecx
558
        loop    .next_window
559
	jne    .next_window	; <<<<<<<<<<<
Line 559... Line 560...
559
 
560
 
Line 1452... Line 1453...
1452
        movzx   eax, bx
1453
	movzx	eax, bx
1453
        mov     [edi + WDATA.box.width], eax
1454
	mov	[edi + WDATA.box.width], eax
1454
        movzx   eax, cx
1455
	movzx	eax, cx
1455
        mov     [edi + WDATA.box.height], eax
1456
	mov	[edi + WDATA.box.height], eax
1456
        sar     ebx, 16
1457
	sar	ebx, 16
-
 
1458
	and	bl, 0xFC		; <<<<<<<<
1457
        sar     ecx, 16
1459
	sar	ecx, 16
-
 
1460
	and	cl, 0xFE		; <<<<<<<<
1458
        mov     [edi + WDATA.box.left], ebx
1461
	mov	[edi + WDATA.box.left], ebx
1459
        mov     [edi + WDATA.box.top], ecx
1462
	mov	[edi + WDATA.box.top], ecx
Line 1460... Line 1463...
1460
 
1463
 
Line 1671... Line 1674...
1671
        inc     ecx
1674
	inc	ecx
1672
        inc     edx
1675
	inc	edx
Line 1673... Line 1676...
1673
 
1676
 
1674
        ; get WinMap start
1677
	; get WinMap start
1675
        push    esi
1678
	push	esi
1676
        mov     edi, [Screen_Max_X]
-
 
1677
        inc     edi
1679
	mov	edi, [_WinMapWidth]
1678
        mov     esi, edi
1680
	mov	esi, edi
-
 
1681
	imul	edi, ebx
-
 
1682
	shr	eax, 1
1679
        imul    edi, ebx
1683
     	shr	eax, 1
1680
        add     edi, eax
1684
	add	edi, eax
1681
        add     edi, [_WinMapAddress]
1685
	add	edi, [_WinMapAddress]
1682
        pop     eax
1686
	pop	eax
1683
        mov     ah, al
1687
	mov	ah, al
Line 1713... Line 1717...
1713
 
1717
 
Line 1714... Line 1718...
1714
        push    [edi + APPDATA.wnd_shape_scale]  ; push scale first -> for loop
1718
	push	[edi + APPDATA.wnd_shape_scale]  ; push scale first -> for loop
1715
 
1719
 
1716
        ; get WinMap start  -> ebp
1720
	; get WinMap start  -> ebp
1717
        push    eax
-
 
1718
        mov     eax, [Screen_Max_X] ; screen_sx
1721
	push	eax
1719
        inc     eax
1722
	mov	eax, [_WinMapWidth] ; <<<<
-
 
1723
	imul	eax, ebx
-
 
1724
	mov	ebp, [esp]
1720
        imul    eax, ebx
1725
	shr	ebp, 1
1721
        add     eax, [esp]
1726
	shr	ebp, 1
Line 1722... Line 1727...
1722
        add     eax, [_WinMapAddress]
1727
	add	ebp, eax
1723
        mov     ebp, eax
1728
	add	ebp, [_WinMapAddress]
Line 1724... Line 1729...
1724
 
1729
 
Line 2083... Line 2088...
2083
        call    draw_rectangle.forced
2088
	call	draw_rectangle.forced
2084
        pop     esi ebx eax
2089
	pop	esi ebx eax
2085
        ret
2090
	ret
Line 2086... Line 2091...
2086
 
2091
 
2087
diff16 "window code end",0,$
2092
diff16 "window code end",0,$