diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-05-27 14:58:13 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-05-27 14:58:13 +0200 |
commit | 265d6934cd70a60228e7a11cfc000aff73dd4701 (patch) | |
tree | 610eb753fea70e7f407e751e22697fc8a1ec04bd /app/wlib/gtklib/window.c | |
parent | bd8c21a35fd05fcbdaa95e4c0b7c94c3b97507b6 (diff) | |
parent | 359b557176b9bb2ff1aed2082641eed39c358d0d (diff) |
Update upstream source from tag 'upstream/5.1.2a'
Update to upstream version '5.1.2a'
with Debian dir 4d0d8239e41bb5de5dc968c2a5c6eb9c140bb2f3
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); |