Rev 4424 | Rev 5351 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4424 | Rev 5350 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2010-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2010-2012. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 4424 $ |
8 | $Revision: 5350 $ |
Line 9... | Line 9... | ||
9 | 9 | ||
10 | include 'mousepointer.inc' |
10 | include 'mousepointer.inc' |
Line 392... | Line 392... | ||
392 | jge @f |
392 | jge @f |
393 | xor eax, eax |
393 | xor eax, eax |
394 | mov [mouse.active_sys_window.new_box.left], eax |
394 | mov [mouse.active_sys_window.new_box.left], eax |
395 | @@: |
395 | @@: |
396 | add eax, [mouse.active_sys_window.new_box.width] |
396 | add eax, [mouse.active_sys_window.new_box.width] |
397 | cmp eax, [Screen_Max_X] |
397 | cmp eax, [_display.width] |
398 | jl @f |
398 | jl @f |
399 | sub eax, [Screen_Max_X] |
399 | sub eax, [_display.width] |
400 | sub [mouse.active_sys_window.new_box.left], eax |
400 | sub [mouse.active_sys_window.new_box.left], eax |
401 | @@: |
401 | @@: |
402 | mov eax, [mouse.active_sys_window.new_box.top] |
402 | mov eax, [mouse.active_sys_window.new_box.top] |
403 | or eax, eax |
403 | or eax, eax |
404 | jge @f |
404 | jge @f |
405 | xor eax, eax |
405 | xor eax, eax |
406 | mov [mouse.active_sys_window.new_box.top], eax |
406 | mov [mouse.active_sys_window.new_box.top], eax |
407 | @@: |
407 | @@: |
408 | add eax, [mouse.active_sys_window.new_box.height] |
408 | add eax, [mouse.active_sys_window.new_box.height] |
409 | cmp eax, [Screen_Max_Y] |
409 | cmp eax, [_display.height] |
410 | jle .call_window_handler |
410 | jl .call_window_handler |
411 | sub eax, [Screen_Max_Y] |
411 | sub eax, [_display.height] |
412 | sub [mouse.active_sys_window.new_box.top], eax |
412 | sub [mouse.active_sys_window.new_box.top], eax |
413 | jmp .call_window_handler |
413 | jmp .call_window_handler |
Line 414... | Line 414... | ||
414 | 414 | ||
415 | .check_resize_w: |
415 | .check_resize_w: |
Line 456... | Line 456... | ||
456 | jge @f |
456 | jge @f |
457 | mov eax, ecx |
457 | mov eax, ecx |
458 | mov [mouse.active_sys_window.new_box.height], eax |
458 | mov [mouse.active_sys_window.new_box.height], eax |
459 | @@: |
459 | @@: |
460 | add eax, [mouse.active_sys_window.new_box.top] |
460 | add eax, [mouse.active_sys_window.new_box.top] |
461 | cmp eax, [Screen_Max_Y] |
461 | cmp eax, [_display.height] |
462 | jle .check_resize_e |
462 | jl .check_resize_e |
463 | sub eax, [Screen_Max_Y] |
463 | sub eax, [_display.height] |
464 | neg eax |
464 | neg eax |
465 | add [mouse.active_sys_window.new_box.height], eax |
465 | add [mouse.active_sys_window.new_box.height], eax |
466 | mov ecx, [Screen_Max_Y] |
466 | mov ecx, [_display.height] |
467 | cmp ecx, eax |
467 | cmp ecx, eax |
468 | jge .check_resize_e |
468 | jg .check_resize_e |
469 | mov [mouse.active_sys_window.new_box.height], ecx |
469 | mov [mouse.active_sys_window.new_box.height], ecx |
Line 470... | Line 470... | ||
470 | 470 | ||
471 | .check_resize_e: |
471 | .check_resize_e: |
472 | test dl, mouse.WINDOW_RESIZE_E_FLAG |
472 | test dl, mouse.WINDOW_RESIZE_E_FLAG |
Line 482... | Line 482... | ||
482 | jge @f |
482 | jge @f |
483 | mov eax, 127 |
483 | mov eax, 127 |
484 | mov [mouse.active_sys_window.new_box.width], eax |
484 | mov [mouse.active_sys_window.new_box.width], eax |
485 | @@: |
485 | @@: |
486 | add eax, [mouse.active_sys_window.new_box.left] |
486 | add eax, [mouse.active_sys_window.new_box.left] |
487 | cmp eax, [Screen_Max_X] |
487 | cmp eax, [_display.width] |
488 | jle .call_window_handler |
488 | jl .call_window_handler |
489 | sub eax, [Screen_Max_X] |
489 | sub eax, [_display.width] |
490 | neg eax |
490 | neg eax |
491 | add [mouse.active_sys_window.new_box.width], eax |
491 | add [mouse.active_sys_window.new_box.width], eax |
492 | mov ecx, [Screen_Max_X] |
492 | mov ecx, [_display.width] |
493 | cmp ecx, eax |
493 | cmp ecx, eax |
494 | jge .call_window_handler |
494 | jg .call_window_handler |
495 | mov [mouse.active_sys_window.new_box.width], ecx |
495 | mov [mouse.active_sys_window.new_box.width], ecx |
Line 496... | Line 496... | ||
496 | 496 | ||
497 | .call_window_handler: |
497 | .call_window_handler: |
498 | mov eax, mouse.active_sys_window.old_box |
498 | mov eax, mouse.active_sys_window.old_box |