On Tue, Apr 19, 2011 at 07:13:03PM +0200, Adam Wysocki wrote:
> On Tue, 19 Apr 2011, Mikolaj Kucharski wrote:
> 
> > 19:02 ::: EKG - Eksperymentalny Klient Gadu-Gadu (20110418)
> > 19:02 ::: libgadu-20110418 (protokol 0x2e, klient 10.1.0.11070)
> > 19:02 ::: skompilowano: Apr 19 2011 18:00:17
> > 
> > E-e, to samo, problem nadal wystepuje podczas zmiany rozmiaru okna.
> 
> Czy polecenie /_resize powoduje wtedy zmianę rozmiaru okna?

Nie. Nic sie nie dzieje.

> W ui_ncurses.c w funkcji ui_ncurses_loop jest taki if:
> 
> if (ui_need_refresh) {
>         ui_need_refresh = 0;
>         endwin();
>         refresh();
>         keypad(input, TRUE);
>         /* wywoła wszystko, co potrzebne */
>         header_statusbar_resize(NULL);
>         changed_backlog_size("backlog_size");
> 
>         goto redraw_prompt;
> }
> 
> Dodaj przed goto:
> 
> gg_debug(GG_DEBUG_MISC, "// refresh\n");

Najpierw zmienilem rozmiar okna 4 razy. Nastepnie wykonalem pare razy
samo /_resize z wiersza polecen:

19:33 // SIGWINCH
19:33 // refresh
19:33 // SIGWINCH
19:33 // refresh
19:33 // SIGWINCH
19:33 // refresh
19:33 // SIGWINCH
19:33 // refresh
19:33 // refresh
19:33 // refresh
19:33 // refresh

Nic sie nie dzieje, ekg nie zmienia rozmaru okna (ekg-20110418).


--- src/ui-ncurses.c.orig       Mon Apr 18 21:00:09 2011
+++ src/ui-ncurses.c    Tue Apr 19 18:31:31 2011
@@ -2408,8 +2408,11 @@ static void update_statusbar(int commit)
 #ifdef SIGWINCH
 static void sigwinch_handler(int sig)
 {
+       gg_debug(GG_DEBUG_MISC, "// SIGWINCH\n");
        ui_need_refresh = 1;
 }
+#else
+#error Brak SIGWINCH
 #endif

 void save_windows()
@@ -4756,6 +4759,7 @@ static void ui_ncurses_loop()
                        header_statusbar_resize(NULL);
                        changed_backlog_size("backlog_size");

+                       gg_debug(GG_DEBUG_MISC, "// refresh\n");
                        goto redraw_prompt;
                }


-- 
best regards
q#

Odpowiedź listem elektroniczym