mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-07 10:26:27 +00:00
x11: Use the SDL_WindowFlags type instead of Uint32
Uint32 can potentially truncate the flag value, as it is 64 bits in SDL3.
This commit is contained in:
@@ -1658,7 +1658,7 @@ static void X11_DispatchEvent(SDL_VideoDevice *_this, XEvent *xevent)
|
|||||||
* expected by SDL and its clients. Defer emitting the size/move events until the corresponding
|
* expected by SDL and its clients. Defer emitting the size/move events until the corresponding
|
||||||
* PropertyNotify arrives for consistency.
|
* PropertyNotify arrives for consistency.
|
||||||
*/
|
*/
|
||||||
const Uint32 changed = X11_GetNetWMState(_this, data->window, xevent->xproperty.window) ^ data->window->flags;
|
const SDL_WindowFlags changed = X11_GetNetWMState(_this, data->window, xevent->xproperty.window) ^ data->window->flags;
|
||||||
if (changed & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_MAXIMIZED)) {
|
if (changed & (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_MAXIMIZED)) {
|
||||||
SDL_copyp(&data->pending_xconfigure, &xevent->xconfigure);
|
SDL_copyp(&data->pending_xconfigure, &xevent->xconfigure);
|
||||||
data->emit_size_move_after_property_notify = true;
|
data->emit_size_move_after_property_notify = true;
|
||||||
|
@@ -283,7 +283,7 @@ static void X11_SetKeyboardFocus(SDL_Window *window, bool set_active_focus)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Uint32 X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow)
|
SDL_WindowFlags X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow)
|
||||||
{
|
{
|
||||||
SDL_VideoData *videodata = _this->internal;
|
SDL_VideoData *videodata = _this->internal;
|
||||||
Display *display = videodata->display;
|
Display *display = videodata->display;
|
||||||
|
@@ -128,7 +128,7 @@ struct SDL_WindowData
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern void X11_SetNetWMState(SDL_VideoDevice *_this, Window xwindow, SDL_WindowFlags flags);
|
extern void X11_SetNetWMState(SDL_VideoDevice *_this, Window xwindow, SDL_WindowFlags flags);
|
||||||
extern Uint32 X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow);
|
extern SDL_WindowFlags X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow);
|
||||||
|
|
||||||
extern bool X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props);
|
extern bool X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props);
|
||||||
extern char *X11_GetWindowTitle(SDL_VideoDevice *_this, Window xwindow);
|
extern char *X11_GetWindowTitle(SDL_VideoDevice *_this, Window xwindow);
|
||||||
|
Reference in New Issue
Block a user