Skip to content
Snippets Groups Projects
Commit 31a17863 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Allow setting the class name at start

This allows X11 stuff to work properly.
parent fcf10142
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4383 passed
......@@ -92,6 +92,7 @@ CIOLIBEXPORT int ciolib_initial_mode = C80;
CIOLIBEXPORT enum ciolib_scaling ciolib_initial_scaling_type = CIOLIB_SCALING_INTERNAL;
CIOLIBEXPORT const void * ciolib_initial_icon = syncicon64;
CIOLIBEXPORT size_t ciolib_initial_icon_width = SYNCICON64_WIDTH;
CIOLIBEXPORT const char *ciolib_initial_program_name = "CIOLIB";
CIOLIBEXPORT const uint32_t *ciolib_r2yptr;
CIOLIBEXPORT const uint32_t *ciolib_y2rptr;
......
......@@ -419,6 +419,7 @@ CIOLIBEXPORTVAR int ciolib_initial_mode;
CIOLIBEXPORTVAR enum ciolib_scaling ciolib_initial_scaling_type;
CIOLIBEXPORTVAR const void * ciolib_initial_icon;
CIOLIBEXPORTVAR size_t ciolib_initial_icon_width;
CIOLIBEXPORTVAR const char *ciolib_initial_program_name;
CIOLIBEXPORTVAR const uint32_t *ciolib_r2yptr;
CIOLIBEXPORTVAR const uint32_t *ciolib_y2rptr;
......
......@@ -566,8 +566,10 @@ static int init_window()
w, h, 2, depth, InputOutput, visual, CWColormap | CWBorderPixel | CWBackPixel, &wa);
classhints=x11.XAllocClassHint();
if (classhints)
classhints->res_name = classhints->res_class = "CIOLIB";
if (classhints) {
classhints->res_name = ciolib_initial_program_name;
classhints->res_class = "CIOLIB";
}
wmhints=x11.XAllocWMHints();
wmhints->flags = 0;
if(wmhints) {
......
......@@ -1561,6 +1561,7 @@ main(int argc, char **argv)
ciolib_initial_icon = syncterm_icon.pixel_data;
ciolib_initial_icon_width = syncterm_icon.width;
ciolib_initial_scaling = settings.scaling_factor;
ciolib_initial_program_name = "syncterm";
ciolib_mode = settings.output_mode;
if (settings.startup_mode != SCREEN_MODE_CURRENT)
text_mode = screen_to_ciolib(settings.startup_mode);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment