aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-07-17 14:28:10 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-18 03:48:02 +0000
commit7fca81dd3fd3cfd5ee6caafacfb61fd19adb0dcb (patch)
treea6342926c5acad6d1d1ed77b8e707ea0e9a039a8 /terminal.c
parentterminal: break out scaling factor updating, and reduce number of calls to render_resize() (diff)
term: get_font_subpixel(): use subpixel from monitor we were *last* mapped on
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/terminal.c b/terminal.c
index 86cb365a..2f0e632c 100644
--- a/terminal.c
+++ b/terminal.c
@@ -847,7 +847,8 @@ get_font_subpixel(const struct terminal *term)
* output or not.
*
* Thus, when determining which subpixel mode to use, we can't do
- * much but select *an* output. So, we pick the first one.
+ * much but select *an* output. So, we pick the one we were most
+ * recently mapped on.
*
* If we're not mapped at all, we pick the first available
* monitor, and hope that's where we'll eventually get mapped.
@@ -857,7 +858,7 @@ get_font_subpixel(const struct terminal *term)
*/
if (tll_length(term->window->on_outputs) > 0)
- wl_subpixel = tll_front(term->window->on_outputs)->subpixel;
+ wl_subpixel = tll_back(term->window->on_outputs)->subpixel;
else if (tll_length(term->wl->monitors) > 0)
wl_subpixel = tll_front(term->wl->monitors).subpixel;
else