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

Update gg.c.v screen_size function for Linux and BSD-derivatives #23146

Closed
2 tasks
Wajinn opened this issue Dec 13, 2024 · 0 comments · Fixed by #23326
Closed
2 tasks

Update gg.c.v screen_size function for Linux and BSD-derivatives #23146

Wajinn opened this issue Dec 13, 2024 · 0 comments · Fixed by #23326
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one. Graphics/multimedia/gg/sokol A video, sound, rendering, or fonts related issue.

Comments

@Wajinn
Copy link

Wajinn commented Dec 13, 2024

Describe the feature

The screen_size function of gg.c.v is non-functional for Linux and BSD-derivative OSes. Suggest using similar code as done by islonely, which comes from Xlib.h (DefaultScreen(dpy)).

Example:

struct Size {
	int width, height;
};

struct Size screen_size() {
	Display *dpy = XOpenDisplay(0);
	int screen = DefaultScreen(dpy);
	struct Size sz = {
		DisplayWidth(dpy, screen),
		DisplayHeight(dpy, screen)
	};
	XCloseDisplay(dpy);
	return sz;
}

Use Case

Will give screen size for Linux and BSD-type OSes.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

V 0.4.8

Environment details (OS name and version, etc.)

Linux and BSD-derivatives

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@felipensp felipensp added Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one. Graphics/multimedia/gg/sokol A video, sound, rendering, or fonts related issue. labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one. Graphics/multimedia/gg/sokol A video, sound, rendering, or fonts related issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants