Created attachment 9136 Left: after startup, right: after changing theme forth and back. This happens on xfwm4 4.14.0, and also on current master (0e91faba6701b4c578fd50f81565d02aaa8ebd09). When I login and session starts, windows has their title text slightly moved downwards from center. Screenshot attached. And then if I change theme in xfwm4-settings, title text becomes vertically centered again. Even if I choose the same theme I started with. It also helps to change DPI in xfce4-appearance-settings, just increasing and decreasing it again is enough too. It's sufficient to set font DPI to 140 in xfce4-appearance-settings to reproduce the issue. It happens on a clean profile in a clean installation too. Just non-standard DPI setting causes the title text to be vertically off-center. Also found that the following patch fixes the issue on my installation: diff --git a/src/frame.c b/src/frame.c index 34d1466bb..709f7c46d 100644 --- a/src/frame.c +++ b/src/frame.c @@ -205,14 +205,8 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap * } pango_layout_get_pixel_extents (layout, NULL, &logical_rect); - title_height = screen_info->font_height; - if (!title_height) - { - /* If for some reason the font height is not known, - * use the actual pango layout height. - */ - title_height = logical_rect.height; - } + title_height = logical_rect.height; + title_y = voffset + (frameDecorationTop(screen_info) - title_height) / 2; if (title_y + title_height > frameDecorationTop(screen_info)) { I suspect that screen_info->font_height is somehow keeps the old value before DPI is updated at startup. Perhaps, some race condition. Or maybe signal ordering was changed in GTK 3. Bisecting points to the patch series with GTK 3 migration. The issue is not present before those patches, and present immediately after.
Can confirm in Xfwm4-4.14.0. Having also set custom DPI to 142, the window titles will be misaligned after login. Toggling the title font size back and forth fixes it.
Olivier Fourdan referenced this bugreport in commit 34a31e274af2636d7bcb7cba833738ef4ff1be3e frame: Fix title align https://git.xfce.org/xfce/xfwm4/commit?id=34a31e274af2636d7bcb7cba833738ef4ff1be3e
Olivier Fourdan referenced this bugreport in commit 6523626a96545a1901b91f99e18226d014b11adb frame: Fix title align https://git.xfce.org/xfce/xfwm4/commit?id=6523626a96545a1901b91f99e18226d014b11adb
I've just tested on my setup. All current states of master branch, xfce-4.14 branch, and xfce-4.14.1 tag have the issue fixed. Text is vertically centered.
Olivier Fourdan referenced this bugreport in commit e3bf9ae517a40007bfe92663e3e7ae052f3655f9 frame: Do not use the pre-computed font height https://git.xfce.org/xfce/xfwm4/commit?id=e3bf9ae517a40007bfe92663e3e7ae052f3655f9
Olivier Fourdan referenced this bugreport in commit 065a12049437200035e052962a2a6064f9a31be8 screen: Remove pre-computed font height https://git.xfce.org/xfce/xfwm4/commit?id=065a12049437200035e052962a2a6064f9a31be8
Olivier Fourdan referenced this bugreport in commit d2c453d541a50e856e6e4bdbd6d3badb36b3e3e5 frame: Do not use the pre-computed font height https://gitlab.xfce.org/xfce/xfwm4/commit/d2c453d541a50e856e6e4bdbd6d3badb36b3e3e5
Olivier Fourdan referenced this bugreport in commit 93c8941c50d2d45d557ed263e3f06ac25ece9fbd screen: Remove pre-computed font height https://gitlab.xfce.org/xfce/xfwm4/commit/93c8941c50d2d45d557ed263e3f06ac25ece9fbd