82 } |
82 } |
83 |
83 |
84 static void ui_progressbar_expose(Widget widget, UiProgressBar *pb, XtPointer c) { |
84 static void ui_progressbar_expose(Widget widget, UiProgressBar *pb, XtPointer c) { |
85 Display *dp = XtDisplay(widget); |
85 Display *dp = XtDisplay(widget); |
86 Window w = XtWindow(widget); |
86 Window w = XtWindow(widget); |
|
87 if(w == 0) { |
|
88 return; |
|
89 } |
87 if(!pb->gc) { |
90 if(!pb->gc) { |
88 XGCValues gcvals; |
91 XGCValues gcvals; |
89 gcvals.foreground = pb->color; |
92 gcvals.foreground = pb->color; |
90 pb->gc = XCreateGC(dp, w, (GCForeground), &gcvals); |
93 pb->gc = XCreateGC(dp, w, (GCForeground), &gcvals); |
91 } |
94 } |