mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 19:38:14 +00:00
x11: fix a typo after PR/13855 and kill lots of trailing whitespace
This commit is contained in:
@@ -41,7 +41,7 @@ static void X11_XsettingsNotify(const char *name, XSettingsAction action, XSetti
|
||||
SDL_VideoDevice *_this = data;
|
||||
|
||||
if (SDL_strcmp(name, SDL_XSETTINGS_GDK_WINDOW_SCALING_FACTOR) == 0 ||
|
||||
SDL_strcmp(name, SDL_XSETTINGS_GDK_UNSCALED_DPI) == 0 ||
|
||||
SDL_strcmp(name, SDL_XSETTINGS_GDK_UNSCALED_DPI) == 0 ||
|
||||
SDL_strcmp(name, SDL_XSETTINGS_XFT_DPI) == 0) {
|
||||
UpdateContentScale(_this);
|
||||
}
|
||||
|
@@ -171,8 +171,7 @@ static float X11Toolkit_GetUIScale(XSettingsClient *client, Display *display)
|
||||
// If that failed, try "Xft.dpi" from the XResourcesDatabase...
|
||||
// We attempt to read this directly to get the live value, XResourceManagerString
|
||||
// is cached per display connection.
|
||||
if (scale_factor <= 0.0)
|
||||
{
|
||||
if (scale_factor <= 0.0) {
|
||||
int status, real_format;
|
||||
Atom real_type;
|
||||
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;
|
||||
window->xrandr = X11_XRRQueryExtension(window->display, &xrandr_event_base, &xrandr_error_base);
|
||||
#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.blue = SDL_clamp(window->xcolor[SDL_MESSAGEBOX_COLOR_TEXT].blue + 19500, 0, 65535);
|
||||
|
||||
|
||||
/* Screen */
|
||||
window->parent = parent;
|
||||
if (parent) {
|
||||
@@ -1206,8 +1204,7 @@ void X11Toolkit_ProcessWindowEvents(SDL_ToolkitWindowX11 *data, XEvent *e) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (data->draw) {
|
||||
@@ -1484,7 +1481,6 @@ static void X11Toolkit_DrawButtonControl(SDL_ToolkitControlX11 *control) {
|
||||
control->rect.x, control->rect.y,
|
||||
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_XFillRectangle(control->window->display, control->window->drawable, control->window->ctx,
|
||||
control->rect.x + 1 * control->window->iscale, control->rect.y + 1 * control->window->iscale,
|
||||
|
@@ -49,10 +49,10 @@ typedef enum SDL_ToolkitChildModeX11
|
||||
|
||||
typedef struct SDL_ToolkitWindowX11
|
||||
{
|
||||
/* Locale */
|
||||
/* Locale */
|
||||
char *origlocale;
|
||||
|
||||
/* Mode */
|
||||
/* Mode */
|
||||
SDL_ToolkitWindowModeX11 mode;
|
||||
|
||||
/* Display */
|
||||
@@ -64,7 +64,7 @@ typedef struct SDL_ToolkitWindowX11
|
||||
SDL_Window *parent;
|
||||
struct SDL_ToolkitWindowX11 *tk_parent;
|
||||
|
||||
/* Window */
|
||||
/* Window */
|
||||
Window window;
|
||||
Drawable drawable;
|
||||
|
||||
@@ -72,11 +72,11 @@ typedef struct SDL_ToolkitWindowX11
|
||||
Visual *visual;
|
||||
XVisualInfo vi;
|
||||
Colormap cmap;
|
||||
GC ctx;
|
||||
int depth;
|
||||
GC ctx;
|
||||
int depth;
|
||||
bool pixmap;
|
||||
|
||||
/* X11 extensions */
|
||||
/* X11 extensions */
|
||||
#ifdef SDL_VIDEO_DRIVER_X11_XDBE
|
||||
XdbeBackBuffer buf;
|
||||
bool xdbe; // Whether Xdbe is present or not
|
||||
@@ -86,7 +86,7 @@ typedef struct SDL_ToolkitWindowX11
|
||||
#endif
|
||||
bool utf8;
|
||||
|
||||
/* Atoms */
|
||||
/* Atoms */
|
||||
Atom wm_protocols;
|
||||
Atom wm_delete_message;
|
||||
|
||||
@@ -95,7 +95,7 @@ typedef struct SDL_ToolkitWindowX11
|
||||
int window_height; // Window height.
|
||||
int pixmap_width;
|
||||
int pixmap_height;
|
||||
int window_x;
|
||||
int window_x;
|
||||
int window_y;
|
||||
|
||||
/* XSettings and scaling */
|
||||
@@ -108,14 +108,14 @@ typedef struct SDL_ToolkitWindowX11
|
||||
XFontSet font_set; // for UTF-8 systems
|
||||
XFontStruct *font_struct; // Latin1 (ASCII) fallback.
|
||||
|
||||
/* Control colors */
|
||||
const SDL_MessageBoxColor *color_hints;
|
||||
/* Control colors */
|
||||
const SDL_MessageBoxColor *color_hints;
|
||||
XColor xcolor[SDL_MESSAGEBOX_COLOR_COUNT];
|
||||
XColor xcolor_bevel_l1;
|
||||
XColor xcolor_bevel_l2;
|
||||
XColor xcolor_bevel_d;
|
||||
XColor xcolor_pressed;
|
||||
XColor xcolor_disabled_text;
|
||||
XColor xcolor_disabled_text;
|
||||
|
||||
/* Control list */
|
||||
bool has_focus;
|
||||
@@ -126,12 +126,12 @@ typedef struct SDL_ToolkitWindowX11
|
||||
struct SDL_ToolkitControlX11 **dyn_controls;
|
||||
size_t dyn_controls_sz;
|
||||
|
||||
/* User callbacks */
|
||||
/* User callbacks */
|
||||
void *cb_data;
|
||||
void (*cb_on_scale_change)(struct SDL_ToolkitWindowX11 *, void *);
|
||||
|
||||
/* Popup windows */
|
||||
SDL_ListNode *popup_windows;
|
||||
SDL_ListNode *popup_windows;
|
||||
|
||||
/* Event loop */
|
||||
XEvent *e;
|
||||
@@ -143,7 +143,7 @@ typedef struct SDL_ToolkitWindowX11
|
||||
float ev_scale;
|
||||
float ev_iscale;
|
||||
bool draw;
|
||||
bool close;
|
||||
bool close;
|
||||
long event_mask;
|
||||
} SDL_ToolkitWindowX11;
|
||||
|
||||
@@ -183,7 +183,7 @@ typedef struct SDL_ToolkitMenuItemX11
|
||||
bool checkbox;
|
||||
bool checked;
|
||||
bool disabled;
|
||||
void *cb_data;
|
||||
void *cb_data;
|
||||
void (*cb)(struct SDL_ToolkitMenuItemX11 *, void *);
|
||||
SDL_ListNode *sub_menu;
|
||||
|
||||
|
Reference in New Issue
Block a user