XDefaultScreen
(usually called by the macroDefaultScreen
) returns the screen number which is used in most xlib functions where you want to specify a screen e.g.DefaultGC
.XDefaultScreenOfDisplay
(usually called by the macroDefaultScreenOfDisplay
) returns a Screen pointer and is generally used when you want to find out information about a screen e.g.WidthOfScreen
.
What are the differences between XDefaultScreen and XDefaultScreenOfDisplay?
-
05-07-2023 - |
Question
What are the differences between XDefaultScreen
and XDefaultScreenOfDisplay
? I can see they respectively return an integer and a struct pointer, but:
- What are those return values used for?
- When would you choose one over the other?
- Why are there 2 functions anyway?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow