Compare commits

...

3 Commits

Author SHA1 Message Date
Chun-wei Fan
8b49ebe34f gdkevents-win32.c: Avoid crash in SetTimer()
Since we only support a single GdkDisplay for Windows, make use of it to
ensure we always obtain a proper GdkDisplay to check whether a modal
operation is in progress.

This should fix issue #7147.
2024-11-11 12:53:39 +08:00
Matthias Clasen
29fd4ee16e Merge branch 'for-main' into 'main'
rendernodeparser: Use advance width for glyphs

See merge request GNOME/gtk!7896
2024-11-10 02:11:32 +00:00
Matthias Clasen
cb0c4d6e88 rendernodeparser: Use advance width for glyphs
Commit f5159e1ecb introduced more flexible ways of specifying
glyph strings in node files, but it used ink rect width instead
of the more appropriate advance width when reconstrucing the
glyph string.

Fix expected output of one test to match.
2024-11-07 15:46:09 -05:00
3 changed files with 7 additions and 5 deletions

View File

@@ -1365,7 +1365,9 @@ modal_timer_proc (HWND hwnd,
DWORD time)
{
int arbitrary_limit = 10;
GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_surface_get_display (GDK_SURFACE (id)));
/* todo: if we support multiple GdkDisplay's on Windows? */
GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_display_get_default ());
while (display->display_surface_record->modal_operation_in_progress != GDK_WIN32_MODAL_OP_NONE &&
g_main_context_pending (NULL) &&

View File

@@ -2638,11 +2638,11 @@ unpack_glyphs (PangoFont *font,
}
else
{
PangoRectangle ink_rect;
PangoRectangle rect;
pango_font_get_glyph_extents (font, gi->glyph, &ink_rect, NULL);
pango_font_get_glyph_extents (font, gi->glyph, NULL, &rect);
gi->geometry.width = ink_rect.width;
gi->geometry.width = rect.width;
}
}

View File

@@ -1,6 +1,6 @@
text {
color: rgb(50,50,50);
font: "Cantarell 14px";
glyphs: "N", 430 4.2002, 406 6.10352, 417 7, 772 4, 783 5, 783 5, 793 6 0 0 same-cluster;
glyphs: "Ntp", 417 7, 772 4, 783 5, 783 5, 793 6 0 0 same-cluster;
offset: 0 32.0186;
}