Rev 5201 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5201 | Rev 5565 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
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: 5201 $ |
9 | $Revision: 5565 $ |
10 | 10 | ||
11 | ;============================================================================== |
11 | ;============================================================================== |
Line 213... | Line 213... | ||
213 | ;------------------------------------------------------------------------------ |
213 | ;------------------------------------------------------------------------------ |
214 | align 4 |
214 | align 4 |
215 | syscall_display_settings.06: |
215 | syscall_display_settings.06: |
216 | xor esi, esi |
216 | xor esi, esi |
Line 217... | Line 217... | ||
217 | 217 | ||
- | 218 | mov edi, [_display.width] |
|
218 | mov edi, [Screen_Max_X] |
219 | dec edi |
219 | mov eax, ecx |
220 | mov eax, ecx |
220 | movsx ebx, ax |
221 | movsx ebx, ax |
221 | sar eax, 16 |
222 | sar eax, 16 |
222 | cmp eax, ebx |
223 | cmp eax, ebx |
Line 237... | Line 238... | ||
237 | @@: |
238 | @@: |
238 | mov [screen_workarea.right], ebx |
239 | mov [screen_workarea.right], ebx |
239 | ;-------------------------------------- |
240 | ;-------------------------------------- |
240 | align 4 |
241 | align 4 |
241 | .check_horizontal: |
242 | .check_horizontal: |
242 | mov edi, [Screen_Max_Y] |
243 | mov edi, [_display.height] |
- | 244 | dec edi |
|
243 | mov eax, edx |
245 | mov eax, edx |
244 | movsx ebx, ax |
246 | movsx ebx, ax |
245 | sar eax, 16 |
247 | sar eax, 16 |
246 | cmp eax, ebx |
248 | cmp eax, ebx |
247 | jge .check_if_redraw_needed |
249 | jge .check_if_redraw_needed |
Line 298... | Line 300... | ||
298 | ;------------------------------------------------------------------------------ |
300 | ;------------------------------------------------------------------------------ |
299 | align 4 |
301 | align 4 |
300 | syscall_display_settings._.calculate_whole_screen: |
302 | syscall_display_settings._.calculate_whole_screen: |
301 | xor eax, eax |
303 | xor eax, eax |
302 | xor ebx, ebx |
304 | xor ebx, ebx |
303 | mov ecx, [Screen_Max_X] |
305 | mov ecx, [_display.width] |
304 | mov edx, [Screen_Max_Y] |
306 | mov edx, [_display.height] |
- | 307 | dec ecx |
|
- | 308 | dec edx |
|
305 | jmp calculatescreen |
309 | jmp calculatescreen |
306 | ;------------------------------------------------------------------------------ |
310 | ;------------------------------------------------------------------------------ |
307 | align 4 |
311 | align 4 |
308 | syscall_display_settings._.redraw_whole_screen: |
312 | syscall_display_settings._.redraw_whole_screen: |
309 | xor eax, eax |
313 | xor eax, eax |
310 | mov [draw_limits.left], eax |
314 | mov [draw_limits.left], eax |
311 | mov [draw_limits.top], eax |
315 | mov [draw_limits.top], eax |
312 | mov eax, [Screen_Max_X] |
316 | mov eax, [_display.width] |
- | 317 | dec eax |
|
313 | mov [draw_limits.right], eax |
318 | mov [draw_limits.right], eax |
314 | mov eax, [Screen_Max_Y] |
319 | mov eax, [_display.height] |
- | 320 | dec eax |
|
315 | mov [draw_limits.bottom], eax |
321 | mov [draw_limits.bottom], eax |
316 | mov eax, window_data |
322 | mov eax, window_data |
317 | jmp redrawscreen |
323 | jmp redrawscreen |
318 | ;------------------------------------------------------------------------------ |
324 | ;------------------------------------------------------------------------------ |
319 | align 4 |
325 | align 4 |
Line 588... | Line 594... | ||
588 | test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED |
594 | test [edi + WDATA.fl_wstate], WSTATE_MAXIMIZED |
589 | jnz .fix_maximized |
595 | jnz .fix_maximized |
Line 590... | Line 596... | ||
590 | 596 | ||
591 | mov eax, [edi + WDATA.box.left] |
597 | mov eax, [edi + WDATA.box.left] |
592 | add eax, [edi + WDATA.box.width] |
598 | add eax, [edi + WDATA.box.width] |
593 | mov ebx, [Screen_Max_X] |
599 | mov ebx, [_display.width] |
594 | cmp eax, ebx |
600 | cmp eax, ebx |
595 | jle .fix_vertical |
601 | jl .fix_vertical |
596 | mov eax, [edi + WDATA.box.width] |
602 | mov eax, [edi + WDATA.box.width] |
597 | sub eax, ebx |
603 | sub eax, ebx |
598 | jle @f |
604 | jl @f |
599 | mov [edi + WDATA.box.width], ebx |
605 | mov [edi + WDATA.box.width], ebx |
600 | ;-------------------------------------- |
606 | ;-------------------------------------- |
601 | align 4 |
607 | align 4 |
602 | @@: |
608 | @@: |
Line 605... | Line 611... | ||
605 | ;-------------------------------------- |
611 | ;-------------------------------------- |
606 | align 4 |
612 | align 4 |
607 | .fix_vertical: |
613 | .fix_vertical: |
608 | mov eax, [edi + WDATA.box.top] |
614 | mov eax, [edi + WDATA.box.top] |
609 | add eax, [edi + WDATA.box.height] |
615 | add eax, [edi + WDATA.box.height] |
610 | mov ebx, [Screen_Max_Y] |
616 | mov ebx, [_display.height] |
611 | cmp eax, ebx |
617 | cmp eax, ebx |
612 | jle .fix_client_box |
618 | jl .fix_client_box |
613 | mov eax, [edi + WDATA.box.height] |
619 | mov eax, [edi + WDATA.box.height] |
614 | sub eax, ebx |
620 | sub eax, ebx |
615 | jle @f |
621 | jl @f |
616 | mov [edi + WDATA.box.height], ebx |
622 | mov [edi + WDATA.box.height], ebx |
617 | ;-------------------------------------- |
623 | ;-------------------------------------- |
618 | align 4 |
624 | align 4 |
619 | @@: |
625 | @@: |
620 | sub ebx, [edi + WDATA.box.height] |
626 | sub ebx, [edi + WDATA.box.height] |
Line 1716... | Line 1722... | ||
1716 | mov eax, [edi + WDATA.box.left] |
1722 | mov eax, [edi + WDATA.box.left] |
1717 | mov ebx, [edi + WDATA.box.top] |
1723 | mov ebx, [edi + WDATA.box.top] |
1718 | mov ecx, [edi + WDATA.box.width] |
1724 | mov ecx, [edi + WDATA.box.width] |
1719 | mov edx, [edi + WDATA.box.height] |
1725 | mov edx, [edi + WDATA.box.height] |
Line 1720... | Line 1726... | ||
1720 | 1726 | ||
1721 | mov esi, [Screen_Max_X] |
1727 | mov esi, [_display.width] |
1722 | cmp ecx, esi |
1728 | cmp ecx, esi |
1723 | ja .fix_width_high |
1729 | jae .fix_width_high |
1724 | ;-------------------------------------- |
1730 | ;-------------------------------------- |
1725 | align 4 |
1731 | align 4 |
1726 | .check_left: |
1732 | .check_left: |
1727 | or eax, eax |
1733 | or eax, eax |
1728 | jl .fix_left_low |
1734 | jl .fix_left_low |
1729 | add eax, ecx |
1735 | add eax, ecx |
1730 | cmp eax, esi |
1736 | cmp eax, esi |
1731 | jg .fix_left_high |
1737 | jge .fix_left_high |
1732 | ;-------------------------------------- |
1738 | ;-------------------------------------- |
1733 | align 4 |
1739 | align 4 |
1734 | .check_height: |
1740 | .check_height: |
1735 | mov esi, [Screen_Max_Y] |
1741 | mov esi, [_display.height] |
1736 | cmp edx, esi |
1742 | cmp edx, esi |
1737 | ja .fix_height_high |
1743 | jae .fix_height_high |
1738 | ;-------------------------------------- |
1744 | ;-------------------------------------- |
1739 | align 4 |
1745 | align 4 |
1740 | .check_top: |
1746 | .check_top: |
1741 | or ebx, ebx |
1747 | or ebx, ebx |
1742 | jl .fix_top_low |
1748 | jl .fix_top_low |
1743 | add ebx, edx |
1749 | add ebx, edx |
1744 | cmp ebx, esi |
1750 | cmp ebx, esi |
1745 | jg .fix_top_high |
1751 | jge .fix_top_high |
1746 | ;-------------------------------------- |
1752 | ;-------------------------------------- |
1747 | align 4 |
1753 | align 4 |
1748 | .exit: |
1754 | .exit: |
1749 | pop esi edx ecx ebx eax |
1755 | pop esi edx ecx ebx eax |
Line 1885... | Line 1891... | ||
1885 | push esi |
1891 | push esi |
1886 | mov esi, [_display.width] |
1892 | mov esi, [_display.width] |
1887 | mov edi, [d_width_calc_area + ebx*4] |
1893 | mov edi, [d_width_calc_area + ebx*4] |
Line 1888... | Line 1894... | ||
1888 | 1894 | ||
1889 | add edi, eax |
1895 | add edi, eax |
1890 | add edi, [_WinMapAddress] |
1896 | add edi, [_display.win_map] |
1891 | pop eax |
1897 | pop eax |
1892 | mov ah, al |
1898 | mov ah, al |
1893 | push ax |
1899 | push ax |
1894 | shl eax, 16 |
1900 | shl eax, 16 |
Line 1927... | Line 1933... | ||
1927 | ; get WinMap start -> ebp |
1933 | ; get WinMap start -> ebp |
1928 | push eax |
1934 | push eax |
1929 | mov eax, [d_width_calc_area + ebx*4] |
1935 | mov eax, [d_width_calc_area + ebx*4] |
Line 1930... | Line 1936... | ||
1930 | 1936 | ||
1931 | add eax, [esp] |
1937 | add eax, [esp] |
1932 | add eax, [_WinMapAddress] |
1938 | add eax, [_display.win_map] |
Line 1933... | Line 1939... | ||
1933 | mov ebp, eax |
1939 | mov ebp, eax |
1934 | 1940 | ||
Line 1990... | Line 1996... | ||
1990 | cmp edx, [ff_xsz] |
1996 | cmp edx, [ff_xsz] |
1991 | jb .ff_new_x |
1997 | jb .ff_new_x |
Line 1992... | Line 1998... | ||
1992 | 1998 | ||
1993 | sub ebp, [ff_xsz] |
1999 | sub ebp, [ff_xsz] |
1994 | add ebp, [ff_x] |
2000 | add ebp, [ff_x] |
1995 | add ebp, [Screen_Max_X] ; screen.x |
- | |
1996 | inc ebp |
2001 | add ebp, [_display.width] ; screen.x |
1997 | inc ebx |
2002 | inc ebx |
1998 | cmp ebx, [ff_ysz] |
2003 | cmp ebx, [ff_ysz] |
Line 1999... | Line 2004... | ||
1999 | jb .ff_new_y |
2004 | jb .ff_new_y |