42_solong/minilibx-linux/mlx_screen_size.c

14 lines
288 B
C
Raw Permalink Normal View History

2022-12-22 11:56:11 -05:00
#include "mlx_int.h"
int mlx_get_screen_size(void *mlx_ptr, int *sizex, int *sizey)
{
XWindowAttributes xwAttr;
Status ret;
t_xvar *xvar;
xvar = mlx_ptr;
ret = XGetWindowAttributes(xvar->display, xvar->root, &xwAttr);
(*sizex) = xwAttr.width;
(*sizey) = xwAttr.height;
}