From 834b4db346120093c31fe93a7fd0d7da03f167b8 Mon Sep 17 00:00:00 2001 From: "Alexey Teplov (" Date: Tue, 2 Jun 2009 18:09:29 +0000 Subject: [PATCH] a logic bugfix. git-svn-id: svn://kolibrios.org@1100 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/media/scrshoot/scrshoot.asm | 15 +++++++++++---- programs/media/scrshoot/scrwin.inc | 15 ++++++++++++++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/programs/media/scrshoot/scrshoot.asm b/programs/media/scrshoot/scrshoot.asm index 1afab899eb..1bc6de74a0 100644 --- a/programs/media/scrshoot/scrshoot.asm +++ b/programs/media/scrshoot/scrshoot.asm @@ -164,16 +164,21 @@ ipc: min_window jmp .clear_ipc @@: - + cmp word [app_ipc+8],3 + jne @f + mov ecx,[slot_n] + activ_window + jmp .clear_ipc +@@: call draw_number call dr_st .clear_ipc: cld xor eax,eax - mov ecx,32 + mov ecx,32/4 mov edi,app_ipc - rep stosb + rep stosd jmp still p_close: @@ -314,7 +319,9 @@ shoot: bt dword [ch2.flags],1 ; показать окно предпросмотра ? jnc @f + call show_scr_window + ret @@: bt word [ch3.flags],1 ; восстановить окно ? jnc @f @@ -575,7 +582,7 @@ messages: .draw_number dw 0 .draw_status dw 1 .min_window dw 2 - +.act_window dw 3 grab_text: db title,0 diff --git a/programs/media/scrshoot/scrwin.inc b/programs/media/scrshoot/scrwin.inc index 1f7e3ac78b..d13a25b30d 100644 --- a/programs/media/scrshoot/scrwin.inc +++ b/programs/media/scrshoot/scrwin.inc @@ -6,7 +6,7 @@ scr_window: .red: call .draw_window .still: - wait_event .red,close + wait_event .red,.close jmp .still .draw_window: @@ -37,6 +37,19 @@ scr_window: stop_draw_window ret +.close: + bt word [ch3.flags],1 ; восстановить окно ? + jnc @f + + mov eax,60 + mov ebx,2 + mov ecx,[app.pid] + mov edx,messages.act_window + mov esi,2 + mcall +@@: + jmp close + .label label 20,20,0x80000000,$+4 db 'Это ваш снимок. Выход - любая клавиша.',0