--- a/ui/motif/toolkit.c Mon Nov 30 14:09:55 2015 +0100 +++ b/ui/motif/toolkit.c Tue Jan 12 17:41:08 2016 +0100 @@ -166,6 +166,7 @@ void ui_show(UiObject *obj) { uic_check_group_widgets(obj->ctx); XtRealizeWidget(obj->widget); + ui_window_dark_theme(XtDisplay(obj->widget), XtWindow(obj->widget)); // TODO: if } // implemented in window.c @@ -293,3 +294,17 @@ Widget ui_get_active_window() { return active_window; } + +void ui_window_dark_theme(Display *dp, Window window) { + Atom atom = XInternAtom(dp, "_GTK_THEME_VARIANT", False); + Atom type = XInternAtom(dp, "UTF8_STRING", False); + XChangeProperty( + dp, + window, + atom, + type, + 8, + PropModeReplace, + "dark", + 4); +}