ui/motif/toolkit.c

changeset 99
ea1a2d5de765
parent 86
3c63f57a8f77
child 122
e82b01d17a78
equal deleted inserted replaced
98:efaae97bd95b 99:ea1a2d5de765
164 } 164 }
165 165
166 void ui_show(UiObject *obj) { 166 void ui_show(UiObject *obj) {
167 uic_check_group_widgets(obj->ctx); 167 uic_check_group_widgets(obj->ctx);
168 XtRealizeWidget(obj->widget); 168 XtRealizeWidget(obj->widget);
169 ui_window_dark_theme(XtDisplay(obj->widget), XtWindow(obj->widget)); // TODO: if
169 } 170 }
170 171
171 // implemented in window.c 172 // implemented in window.c
172 //void ui_close(UiObject *obj) 173 //void ui_close(UiObject *obj)
173 174
291 } 292 }
292 293
293 Widget ui_get_active_window() { 294 Widget ui_get_active_window() {
294 return active_window; 295 return active_window;
295 } 296 }
297
298 void ui_window_dark_theme(Display *dp, Window window) {
299 Atom atom = XInternAtom(dp, "_GTK_THEME_VARIANT", False);
300 Atom type = XInternAtom(dp, "UTF8_STRING", False);
301 XChangeProperty(
302 dp,
303 window,
304 atom,
305 type,
306 8,
307 PropModeReplace,
308 "dark",
309 4);
310 }

mercurial