What are the differences between XDefaultScreen
and XDefaultScreenOfDisplay
? I can see they respectively return an integer and a struct pointer, but:
XDefaultScreen
(usually called by the macro DefaultScreen
) 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 macro DefaultScreenOfDisplay
) returns a Screen pointer and is generally used when you want to find out information about a screen e.g. WidthOfScreen
.