@@ -280,15 +280,15 @@ bool create_workspaces(
280280 wlmtk_workspace_t * workspace_ptr = wlmtk_workspace_create (
281281 server_ptr -> wlr_output_layout_ptr ,
282282 s .name ,
283- & server_ptr -> style . tile );
283+ & server_ptr -> style_ptr -> tile );
284284 if (NULL == workspace_ptr ) {
285285 bs_log (BS_ERROR , "Failed wlmtk_workspace_create(\"%s\")" , s .name );
286286 rv = false;
287287 break ;
288288 }
289289
290290 if (s .color == 0 ) {
291- s .color = server_ptr -> style . background_color ;
291+ s .color = server_ptr -> style_ptr -> background_color ;
292292 }
293293 wlmaker_background_t * background_ptr = wlmaker_background_create (
294294 workspace_ptr ,
@@ -383,13 +383,10 @@ int main(__UNUSED__ int argc, __UNUSED__ const char **argv)
383383 return EXIT_FAILURE ;
384384 }
385385
386- wlmaker_server_t * server_ptr = wlmaker_server_create (
387- config_dict_ptr , files_ptr , & wlmaker_server_options );
388- if (NULL == server_ptr ) return EXIT_FAILURE ;
389-
386+ wlmaker_config_style_t style = {};
390387 bspl_dict_t * style_dict_ptr = bspl_dict_from_object (
391388 wlmaker_config_object_load (
392- server_ptr -> files_ptr ,
389+ files_ptr ,
393390 "style" ,
394391 wlmaker_arg_theme_file_ptr ,
395392 "Themes/Default.plist" ,
@@ -399,15 +396,19 @@ int main(__UNUSED__ int argc, __UNUSED__ const char **argv)
399396 if (!bspl_decode_dict (
400397 style_dict_ptr ,
401398 wlmaker_config_style_desc ,
402- & server_ptr -> style )) return EXIT_FAILURE ;
399+ & style )) return EXIT_FAILURE ;
403400 bspl_dict_unref (style_dict_ptr );
404401
402+ wlmaker_server_t * server_ptr = wlmaker_server_create (
403+ config_dict_ptr , files_ptr , & style , & wlmaker_server_options );
404+ if (NULL == server_ptr ) return EXIT_FAILURE ;
405+
405406 // TODO(kaeser@gubbe.ch): Uh, that's ugly...
406407 server_ptr -> root_menu_ptr = wlmaker_root_menu_create (
407408 server_ptr ,
408409 wlmaker_arg_root_menu_file_ptr ,
409- & server_ptr -> style . window ,
410- & server_ptr -> style . menu );
410+ & server_ptr -> style_ptr -> window ,
411+ & server_ptr -> style_ptr -> menu );
411412 if (NULL == server_ptr -> root_menu_ptr ) {
412413 return EXIT_FAILURE ;
413414 }
@@ -452,11 +453,11 @@ int main(__UNUSED__ int argc, __UNUSED__ const char **argv)
452453 }
453454
454455 dock_ptr = wlmaker_dock_create (
455- server_ptr , state_dict_ptr , & server_ptr -> style );
456+ server_ptr , state_dict_ptr , & style );
456457 clip_ptr = wlmaker_clip_create (
457- server_ptr , state_dict_ptr , & server_ptr -> style );
458+ server_ptr , state_dict_ptr , & style );
458459 task_list_ptr = wlmaker_task_list_create (
459- server_ptr , & server_ptr -> style );
460+ server_ptr , & style );
460461 if (NULL == dock_ptr || NULL == clip_ptr || NULL == task_list_ptr ) {
461462 bs_log (BS_ERROR , "Failed to create dock, clip or task list." );
462463 } else {
0 commit comments