x11: fix a typo after PR/13855 and kill lots of trailing whitespace

This commit is contained in:
Ozkan Sezer
2025-09-03 04:37:56 +03:00
parent ef19c72015
commit cc9937201e
4 changed files with 223 additions and 227 deletions

View File

@@ -171,8 +171,7 @@ static float X11Toolkit_GetUIScale(XSettingsClient *client, Display *display)
// If that failed, try "Xft.dpi" from the XResourcesDatabase... // If that failed, try "Xft.dpi" from the XResourcesDatabase...
// We attempt to read this directly to get the live value, XResourceManagerString // We attempt to read this directly to get the live value, XResourceManagerString
// is cached per display connection. // is cached per display connection.
if (scale_factor <= 0.0) if (scale_factor <= 0.0) {
{
int status, real_format; int status, real_format;
Atom real_type; Atom real_type;
Atom res_mgr; Atom res_mgr;
@@ -472,7 +471,7 @@ SDL_ToolkitWindowX11 *X11Toolkit_CreateWindowStruct(SDL_Window *parent, SDL_Tool
} }
} }
#ifdef SDL_VIDEO_DRIVER_X11_XRSANDR #ifdef SDL_VIDEO_DRIVER_X11_XRANDR
int xrandr_event_base, xrandr_error_base; int xrandr_event_base, xrandr_error_base;
window->xrandr = X11_XRRQueryExtension(window->display, &xrandr_event_base, &xrandr_error_base); window->xrandr = X11_XRRQueryExtension(window->display, &xrandr_event_base, &xrandr_error_base);
#endif #endif
@@ -567,7 +566,6 @@ SDL_ToolkitWindowX11 *X11Toolkit_CreateWindowStruct(SDL_Window *parent, SDL_Tool
window->xcolor_disabled_text.green = SDL_clamp(window->xcolor[SDL_MESSAGEBOX_COLOR_TEXT].green + 19500, 0, 65535); window->xcolor_disabled_text.green = SDL_clamp(window->xcolor[SDL_MESSAGEBOX_COLOR_TEXT].green + 19500, 0, 65535);
window->xcolor_disabled_text.blue = SDL_clamp(window->xcolor[SDL_MESSAGEBOX_COLOR_TEXT].blue + 19500, 0, 65535); window->xcolor_disabled_text.blue = SDL_clamp(window->xcolor[SDL_MESSAGEBOX_COLOR_TEXT].blue + 19500, 0, 65535);
/* Screen */ /* Screen */
window->parent = parent; window->parent = parent;
if (parent) { if (parent) {
@@ -1207,7 +1205,6 @@ void X11Toolkit_ProcessWindowEvents(SDL_ToolkitWindowX11 *data, XEvent *e) {
} }
break; break;
} }
} }
if (data->draw) { if (data->draw) {
@@ -1484,7 +1481,6 @@ static void X11Toolkit_DrawButtonControl(SDL_ToolkitControlX11 *control) {
control->rect.x, control->rect.y, control->rect.x, control->rect.y,
control->rect.w - (1* control->window->iscale), control->rect.h - (1* control->window->iscale)); control->rect.w - (1* control->window->iscale), control->rect.h - (1* control->window->iscale));
X11_XSetForeground(control->window->display, control->window->ctx, control->window->xcolor_bevel_l1.pixel); X11_XSetForeground(control->window->display, control->window->ctx, control->window->xcolor_bevel_l1.pixel);
X11_XFillRectangle(control->window->display, control->window->drawable, control->window->ctx, X11_XFillRectangle(control->window->display, control->window->drawable, control->window->ctx,
control->rect.x + 1 * control->window->iscale, control->rect.y + 1 * control->window->iscale, control->rect.x + 1 * control->window->iscale, control->rect.y + 1 * control->window->iscale,