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

Windowing on Windows #47

Open
agoujot opened this issue Oct 11, 2024 · 3 comments
Open

Windowing on Windows #47

agoujot opened this issue Oct 11, 2024 · 3 comments

Comments

@agoujot
Copy link

agoujot commented Oct 11, 2024

Under Windows, open_graph dimensions do not take into account the height of the title bar, meaning it takes some default 17px from the top of the window things (I don't know exactly what), which means that the window is cropped at the top and at the right, which has to be manually compensated.
Also, from OCaml we cannot see the actual height, which is customizable, but the C code could.

On another note, resize_window is not implemented, and it certainly would be great to have it (else as of now the window always has the size defined in the open_graph).

@nojb
Copy link
Contributor

nojb commented Oct 12, 2024

Dear @agoujot, thanks for the bug report!

I was able to reproduce both of your issues. I tried a quick fix over at

master...nojb:graphics:fix_win32

You may want to try it and confirm whether it works for you.

Since this project is not actively developed, am not sure how likely it is that these fixes (if they are indeed correct) will be integrated. But in any case, it would be great if you could confirm whether they fix things on your side.

@agoujot
Copy link
Author

agoujot commented Oct 12, 2024

Thank you for answering!
Though I'm not much of a C programmer, it looks good to me.
(It will take me a bit of time to test it, as I'm on linux and it happened as I tried to make my code work on someone else's windows computer.)
About graphics' support, do you know why it was deprecated, as it's pretty good and I didn't find alternatives as good, despite graphics' being very old and nearly unmaintained?

@xavierleroy
Copy link
Contributor

About graphics' support, do you know why it was deprecated, as it's pretty good and I didn't find alternatives as good, despite graphics' being very old and nearly unmaintained?

The Graphics library is not deprecated properly speaking, just not actively developed and barely maintained because nobody seems to care enough about it to contribute actual code to improve it.

Concerning alternatives, the OCaml-SDL bindings look rather popular, if only because there are several of them...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants