Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6026 → Rev 7300

/programs/network/ircc/window.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2018. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; Written by hidnplayr@kolibrios.org ;;
81,7 → 81,17
 
ret
 
window_close_all:
 
.loop:
call window_close
 
cmp [window_print], 0
jne .loop
 
ret
 
 
window_close: ; closes the 'print' window
 
; Remove the window (overwrite current structure with trailing ones)
97,20 → 107,36
xor al, al
rep stosb
 
; free the window data block
; Clear the window data block to erase the chat history and nicknames
mov edi, [esp]
mov ecx, sizeof.window_data ; TEXT_BUFFERSIZE + MAX_NICK_LEN * MAX_USERS
rep stosb
 
; And now free the window data block
pop ecx
mcall 68, 13
 
; We closed this window so we need to show another
; Is there still a window in the active position?
mov edi, [window_active]
cmp [edi + window.data_ptr], 0
jne @f
jne .redraw
; Did we just close the last window?
cmp edi, windows
je .closed_last
; Nope, move one window to the left
sub edi, sizeof.window
mov [window_active], edi
mov [window_print], edi
@@:
jmp .redraw
 
.closed_last:
xor edi, edi
mov [window_active], edi
mov [window_print], edi
 
; At last, redraw everything
.redraw:
call draw_window
 
ret