Cleanup: Add comment to wmWindow about pixelsize
Performing operations based on window size in terms of pixel units has a high chance of resulting in unwanted behavior for macOS, due to HiDPI displays. This commit adds an API warning suggesting against usage of the raw `sizex` and `sizey` values. Related to #141982 Pull Request: https://projects.blender.org/blender/blender/pulls/142274
This commit is contained in:
@@ -312,6 +312,10 @@ typedef struct wmWindow {
|
||||
* it causes the window size to be initialized to `wm_init_state.size`.
|
||||
* These default to the main screen size but can be overridden by the `--window-geometry`
|
||||
* command line argument.
|
||||
*
|
||||
* \warning Using these values directly can result in errors on macOS due to HiDPI displays
|
||||
* influencing the window native pixel size. See #WM_window_native_pixel_size for a general use
|
||||
* alternative.
|
||||
*/
|
||||
short sizex, sizey;
|
||||
/** Normal, maximized, full-screen, #GHOST_TWindowState. */
|
||||
|
||||
Reference in New Issue
Block a user