mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 20:08:13 +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;
|
SDL_VideoDevice *_this = data;
|
||||||
|
|
||||||
if (SDL_strcmp(name, SDL_XSETTINGS_GDK_WINDOW_SCALING_FACTOR) == 0 ||
|
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) {
|
SDL_strcmp(name, SDL_XSETTINGS_XFT_DPI) == 0) {
|
||||||
UpdateContentScale(_this);
|
UpdateContentScale(_this);
|
||||||
}
|
}
|
||||||
|
@@ -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) {
|
||||||
@@ -1206,8 +1204,7 @@ 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,
|
||||||
|
@@ -49,10 +49,10 @@ typedef enum SDL_ToolkitChildModeX11
|
|||||||
|
|
||||||
typedef struct SDL_ToolkitWindowX11
|
typedef struct SDL_ToolkitWindowX11
|
||||||
{
|
{
|
||||||
/* Locale */
|
/* Locale */
|
||||||
char *origlocale;
|
char *origlocale;
|
||||||
|
|
||||||
/* Mode */
|
/* Mode */
|
||||||
SDL_ToolkitWindowModeX11 mode;
|
SDL_ToolkitWindowModeX11 mode;
|
||||||
|
|
||||||
/* Display */
|
/* Display */
|
||||||
@@ -64,7 +64,7 @@ typedef struct SDL_ToolkitWindowX11
|
|||||||
SDL_Window *parent;
|
SDL_Window *parent;
|
||||||
struct SDL_ToolkitWindowX11 *tk_parent;
|
struct SDL_ToolkitWindowX11 *tk_parent;
|
||||||
|
|
||||||
/* Window */
|
/* Window */
|
||||||
Window window;
|
Window window;
|
||||||
Drawable drawable;
|
Drawable drawable;
|
||||||
|
|
||||||
@@ -72,11 +72,11 @@ typedef struct SDL_ToolkitWindowX11
|
|||||||
Visual *visual;
|
Visual *visual;
|
||||||
XVisualInfo vi;
|
XVisualInfo vi;
|
||||||
Colormap cmap;
|
Colormap cmap;
|
||||||
GC ctx;
|
GC ctx;
|
||||||
int depth;
|
int depth;
|
||||||
bool pixmap;
|
bool pixmap;
|
||||||
|
|
||||||
/* X11 extensions */
|
/* X11 extensions */
|
||||||
#ifdef SDL_VIDEO_DRIVER_X11_XDBE
|
#ifdef SDL_VIDEO_DRIVER_X11_XDBE
|
||||||
XdbeBackBuffer buf;
|
XdbeBackBuffer buf;
|
||||||
bool xdbe; // Whether Xdbe is present or not
|
bool xdbe; // Whether Xdbe is present or not
|
||||||
@@ -86,7 +86,7 @@ typedef struct SDL_ToolkitWindowX11
|
|||||||
#endif
|
#endif
|
||||||
bool utf8;
|
bool utf8;
|
||||||
|
|
||||||
/* Atoms */
|
/* Atoms */
|
||||||
Atom wm_protocols;
|
Atom wm_protocols;
|
||||||
Atom wm_delete_message;
|
Atom wm_delete_message;
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ typedef struct SDL_ToolkitWindowX11
|
|||||||
int window_height; // Window height.
|
int window_height; // Window height.
|
||||||
int pixmap_width;
|
int pixmap_width;
|
||||||
int pixmap_height;
|
int pixmap_height;
|
||||||
int window_x;
|
int window_x;
|
||||||
int window_y;
|
int window_y;
|
||||||
|
|
||||||
/* XSettings and scaling */
|
/* XSettings and scaling */
|
||||||
@@ -108,14 +108,14 @@ typedef struct SDL_ToolkitWindowX11
|
|||||||
XFontSet font_set; // for UTF-8 systems
|
XFontSet font_set; // for UTF-8 systems
|
||||||
XFontStruct *font_struct; // Latin1 (ASCII) fallback.
|
XFontStruct *font_struct; // Latin1 (ASCII) fallback.
|
||||||
|
|
||||||
/* Control colors */
|
/* Control colors */
|
||||||
const SDL_MessageBoxColor *color_hints;
|
const SDL_MessageBoxColor *color_hints;
|
||||||
XColor xcolor[SDL_MESSAGEBOX_COLOR_COUNT];
|
XColor xcolor[SDL_MESSAGEBOX_COLOR_COUNT];
|
||||||
XColor xcolor_bevel_l1;
|
XColor xcolor_bevel_l1;
|
||||||
XColor xcolor_bevel_l2;
|
XColor xcolor_bevel_l2;
|
||||||
XColor xcolor_bevel_d;
|
XColor xcolor_bevel_d;
|
||||||
XColor xcolor_pressed;
|
XColor xcolor_pressed;
|
||||||
XColor xcolor_disabled_text;
|
XColor xcolor_disabled_text;
|
||||||
|
|
||||||
/* Control list */
|
/* Control list */
|
||||||
bool has_focus;
|
bool has_focus;
|
||||||
@@ -126,12 +126,12 @@ typedef struct SDL_ToolkitWindowX11
|
|||||||
struct SDL_ToolkitControlX11 **dyn_controls;
|
struct SDL_ToolkitControlX11 **dyn_controls;
|
||||||
size_t dyn_controls_sz;
|
size_t dyn_controls_sz;
|
||||||
|
|
||||||
/* User callbacks */
|
/* User callbacks */
|
||||||
void *cb_data;
|
void *cb_data;
|
||||||
void (*cb_on_scale_change)(struct SDL_ToolkitWindowX11 *, void *);
|
void (*cb_on_scale_change)(struct SDL_ToolkitWindowX11 *, void *);
|
||||||
|
|
||||||
/* Popup windows */
|
/* Popup windows */
|
||||||
SDL_ListNode *popup_windows;
|
SDL_ListNode *popup_windows;
|
||||||
|
|
||||||
/* Event loop */
|
/* Event loop */
|
||||||
XEvent *e;
|
XEvent *e;
|
||||||
@@ -143,7 +143,7 @@ typedef struct SDL_ToolkitWindowX11
|
|||||||
float ev_scale;
|
float ev_scale;
|
||||||
float ev_iscale;
|
float ev_iscale;
|
||||||
bool draw;
|
bool draw;
|
||||||
bool close;
|
bool close;
|
||||||
long event_mask;
|
long event_mask;
|
||||||
} SDL_ToolkitWindowX11;
|
} SDL_ToolkitWindowX11;
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ typedef struct SDL_ToolkitMenuItemX11
|
|||||||
bool checkbox;
|
bool checkbox;
|
||||||
bool checked;
|
bool checked;
|
||||||
bool disabled;
|
bool disabled;
|
||||||
void *cb_data;
|
void *cb_data;
|
||||||
void (*cb)(struct SDL_ToolkitMenuItemX11 *, void *);
|
void (*cb)(struct SDL_ToolkitMenuItemX11 *, void *);
|
||||||
SDL_ListNode *sub_menu;
|
SDL_ListNode *sub_menu;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user