summaryrefslogtreecommitdiff
path: root/st
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-12 02:02:21 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-12 02:02:21 +0900
commit4a00c5bf2ae85e0ac00ff0fc9637fd425c3092c0 (patch)
tree3d940b363c3cf53ac9e47856a9180e9fd30c24f9 /st
parent817e9a7155acd5f5e309a8fc1c5b1abe77e44626 (diff)
modified dmenu/dmenu.c, modified st/x.c
Diffstat (limited to 'st')
-rw-r--r--st/x.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/st/x.c b/st/x.c
index a0a87f6..8082ded 100644
--- a/st/x.c
+++ b/st/x.c
@@ -175,7 +175,6 @@ static void xinit(int, int);
static void cresize(int, int);
static void xresize(int, int);
static void xhints(void);
-static void xdisplayresolution(int *, int *);
static int xloadcolor(int, const char *, Color *);
static int xloadfont(Font *, FcPattern *);
static void xloadfonts(const char *, double);
@@ -975,29 +974,6 @@ xgeommasktogravity(int mask)
return SouthEastGravity;
}
-void
-xdisplayresolution(int *width, int *height)
-{
- Display *dpy;
- int screen;
-
- // Open the display
- if (!(dpy = XOpenDisplay(NULL))) {
- fputs("can't open display\n", stderr);
- *width = 0;
- *height = 0;
- return;
- }
-
- // Get screen dimensions
- screen = DefaultScreen(dpy);
- *width = XDisplayWidth(dpy, screen);
- *height = XDisplayHeight(dpy, screen);
-
- // Close the display
- XCloseDisplay(dpy);
-}
-
int
xloadfont(Font *f, FcPattern *pattern)
{
@@ -1200,12 +1176,6 @@ xloadsparefonts(void)
if (defaultfontsize > 0) {
sizeshift = usedfontsize - defaultfontsize;
- // Get screen resolution
- xdisplayresolution(&width, &height);
- // If the resolution is under 1024x768, set the fontsize to 12
- if (width <= 1024 && height <= 768) {
- sizeshift -= 4;
- }
if (sizeshift != 0 &&
FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) ==
FcResultMatch) {
@@ -1353,15 +1323,7 @@ xinit(int cols, int rows)
usedfont = (opt_font == NULL)? fonts[currentfont] : opt_font;
- // Get screen resolution
- xdisplayresolution(&width, &height);
-
- // If the resolution is under 1024x768, set the fontsize to 12
- if (width <= 1024 && height <= 768) {
- xloadfonts(usedfont, 12);
- } else {
- xloadfonts(usedfont, 0);
- }
+ xloadfonts(usedfont, 0);
/* spare fonts */
xloadsparefonts();