Sat, 04 Jan 2025 16:30:06 +0100
add resize handler to progressbar (Motif)
ui/motif/label.c | file | annotate | diff | comparison | revisions |
--- a/ui/motif/label.c Sat Jan 04 16:22:14 2025 +0100 +++ b/ui/motif/label.c Sat Jan 04 16:30:06 2025 +0100 @@ -84,6 +84,9 @@ static void ui_progressbar_expose(Widget widget, UiProgressBar *pb, XtPointer c) { Display *dp = XtDisplay(widget); Window w = XtWindow(widget); + if(w == 0) { + return; + } if(!pb->gc) { XGCValues gcvals; gcvals.foreground = pb->color; @@ -158,6 +161,11 @@ XmNexposeCallback, (XtCallbackProc)ui_progressbar_expose, progressbarData); + XtAddCallback( + drawingArea, + XmNresizeCallback, + (XtCallbackProc)ui_progressbar_expose, + progressbarData); XtManageChild(frame);