Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to force monochrome rendering #18

Open
morgant opened this issue Mar 12, 2021 · 2 comments
Open

Add option to force monochrome rendering #18

morgant opened this issue Mar 12, 2021 · 2 comments
Assignees

Comments

@morgant
Copy link
Owner

morgant commented Mar 12, 2021

mlvwm supports monochrome (1-bit) rendering (though it is mutually exclusive with the System8 configuration option), but most modern versions of X don't support color depths below 8-bit (256 colors). For those who might want to use the monochrome styling, or for development & testing, it'd be nice to add a configuration option that forces it.

@morgant
Copy link
Owner Author

morgant commented Mar 21, 2021

I have started in on this.

I've added a System6 configuration option which is mutually exclusive with the System8 option (and will error if you try to use both at once). I also took a first pass of implementing checks for whether we're in System6 mode whenever we're checking Scr.d_depth. That gets us menus rendering correctly as monochrome (sans icons, which are rendered at the native colour depth), but windows & controls are still rendered in the System 7 grayscale style. This is because the colours are set in InitGCs() in mlvwm.c, but that gets called before ReadConfigFile(), so we don't know we're in System6 mode at the time.

At this point I see two options: re-initialize the colours (maybe by just re-running InitGCs() after ReadConfigFile(), unless that'll not free the colours and cause a memory leak) or updating all the rendering calls to render the three styles instead of just the two. I'll see if I can make the first option work reasonably first.

@morgant
Copy link
Owner Author

morgant commented Mar 22, 2021

While calling InitGCs() after ReadConfigFile() does work as a quick-n-dirty hack, window controls and such are not actually rendered in a System 6 style (just a monochrome System 7 style. So, I need to think how far I want to take this.

@morgant morgant self-assigned this Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant