Added property types: pointer, string, number, float

This commit is contained in:
Sam Lantinga
2023-11-12 09:47:31 -08:00
parent 7c80ac6df7
commit 0907f345cb
28 changed files with 737 additions and 152 deletions

View File

@@ -428,9 +428,9 @@ void SDL_Fcitx_UpdateTextRect(const SDL_Rect *rect)
#ifdef SDL_VIDEO_DRIVER_X11
{
SDL_PropertiesID props = SDL_GetWindowProperties(focused_win);
Display *x_disp = (Display *)SDL_GetProperty(props, "SDL.window.x11.display");
int x_screen = (int)(intptr_t)SDL_GetProperty(props, "SDL.window.x11.screen");
Window x_win = (Window)SDL_GetProperty(props, "SDL.window.x11.window");
Display *x_disp = (Display *)SDL_GetProperty(props, "SDL.window.x11.display", NULL);
int x_screen = SDL_GetNumberProperty(props, "SDL.window.x11.screen", 0);
Window x_win = SDL_GetNumberProperty(props, "SDL.window.x11.window", 0);
Window unused;
if (x_disp && x_win) {
X11_XTranslateCoordinates(x_disp, x_win, RootWindow(x_disp, x_screen), 0, 0, &x, &y, &unused);