diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-06-01 17:08:47 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-06-01 17:08:47 +0200 |
commit | d0b6a8a4ec298024f14f704f9e40a6f9d324ccf3 (patch) | |
tree | 8645f5abd7b89361a1c5ab67e0195c84bc2ceab0 /app/wlib/gtklib/window.c | |
parent | c2b8ba9336499ac930802e957f0d150399f3191e (diff) | |
parent | abf57604846230dc26afe8011aefb8e7bcc34333 (diff) |
Merge debian/watchdebian/1_5.1.2a-1
Diffstat (limited to 'app/wlib/gtklib/window.c')
-rw-r--r-- | app/wlib/gtklib/window.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/app/wlib/gtklib/window.c b/app/wlib/gtklib/window.c index 2470382..49770c5 100644 --- a/app/wlib/gtklib/window.c +++ b/app/wlib/gtklib/window.c @@ -591,7 +591,7 @@ static gint window_delete_event( } if (win->winProc) { - win->winProc(win, wClose_e, win->data); + win->winProc(win, wClose_e, NULL, win->data); if (win != gtkMainW) { wWinShow(win, FALSE); @@ -616,11 +616,22 @@ static int fixed_expose_event( static int resizeTime(wWin_p win) { if (win->resizeW == win->w && win->resizeH == win->h) { // If hasn't changed since last - win->resizeTimer = 0; - return FALSE; //Stop Timer and don't resize + if (win->timer_idle_count>3) { + win->winProc(win, wResize_e, NULL, win->data); //Trigger Redraw on last occasion if one-third of a second has elapsed + win->timer_idle_count = 0; + win->resizeTimer = 0; + win->timer_busy_count = 0; + return FALSE; //Stop Timer and don't resize + } else win->timer_idle_count++; } if (win->busy==FALSE && win->winProc) { //Always drive once - win->winProc(win, wResize_e, win->data); + if (win->timer_busy_count>10) { + win->winProc(win, wResize_e, NULL, win->data); //Redraw if ten times we saw a change (1 sec) + win->timer_busy_count = 0; + } else { + win->winProc(win, wResize_e, (void*) 1, win->data); //No Redraw + win->timer_busy_count++; + } win->resizeW = win->w; //Remember this one win->resizeH = win->h; } @@ -668,7 +679,9 @@ static int window_configure_event( } else { win->resizeW = w; //Remember where this started win->resizeH = h; - win->resizeTimer = g_timeout_add(200,(GSourceFunc)resizeTime,win); // 200ms delay + win->timer_idle_count = 0; //Start background timer on redraw + win->timer_busy_count = 0; + win->resizeTimer = g_timeout_add(100,(GSourceFunc)resizeTime,win); // 100ms delay return FALSE; } } @@ -704,7 +717,7 @@ gboolean window_state_event( } if (win->busy==FALSE && win->winProc) { - win->winProc(win, wState_e, win->data); + win->winProc(win, wState_e, NULL, win->data); } return TRUE; @@ -1079,7 +1092,7 @@ void wExit( wPrefFlush(); if (gtkMainW && gtkMainW->winProc != NULL) { - gtkMainW->winProc(gtkMainW, wQuit_e, gtkMainW->data); + gtkMainW->winProc(gtkMainW, wQuit_e, NULL, gtkMainW->data); } exit(rc); |