Compare commits

...

16 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
d3b22413ec Merge branch 'font-chooser-default-width' into 'main'
fontchooser: Don't make default size translatable

See merge request GNOME/gtk!7905
2024-11-08 00:20:29 +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
Matthias Clasen
331c6c130f fontchooser: Don't make default size translatable
That was a copy/paste error in 2ad2bae1ca.

Thanks to Anders Jonsson for spotting it.
2024-11-07 15:27:36 -05:00
Марко Костић
89d17ec86e Update Serbian translation
(cherry picked from commit 46d268cd47)
2024-11-07 18:03:38 +00:00
Matthias Clasen
0878727ce4 Merge branch 'ci-vs2019' into 'main'
CI: Use Visual Studio 2019 instead of 2017

See merge request GNOME/gtk!7904
2024-11-07 11:09:59 +00:00
Chun-wei Fan
36f5cbeb57 CI: Use Visual Studio 2019 instead of 2017
Visual Studio 2019 brings C11 support and is actually needed (or best
suited at least) if we are:

* Building with debugging code enabled (/Zc:preprocessor is required)
* Introspection works better on Visual Studio 2019 or later, also due to
  the preprocessor improvements.
* Pulling in bleeding edge Cairo (and possibly soon, GLib) already
  requires C11 support.
2024-11-07 17:29:22 +08:00
Matthias Clasen
4a0323d46d Post-release version bump 2024-11-06 21:23:45 -05:00
Matthias Clasen
a4ee14d94f 4.17.0 2024-11-06 20:44:02 -05:00
Chun-wei Fan
be70ff1772 Merge branch 'lb90/for-main' into 'main'
For main

Closes #7075

See merge request GNOME/gtk!7898
2024-11-06 09:39:15 +00:00
Luca Bacci
12b0613b34 GdkWin32: Pass the right arguments when calling modal_timer_proc directly
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7075
2024-11-05 11:16:08 +01:00
Luca Bacci
7d45beb830 Gdk: Remove unused files 2024-11-04 10:13:53 +01:00
Luca Bacci
e75308ad11 GdkWin32: Rework display's beep vfunc to only use MessageBeep
Beep is synchronous, let's just move away from it.

Also add an explicit cast for signed to unsigned conversion.
2024-11-04 10:11:33 +01:00
Luca Bacci
ccecf5916f GdkWin32: Stub out the display's flush and sync vfuncs
There's nothing relevant to do
2024-11-04 10:05:45 +01:00
Luca Bacci
ddc9a6b597 Tools: exit with code 0 when showing --help output
This is in line with what most tools do when printing --help
(and GOptionContext alike)
2024-11-04 09:49:17 +01:00
16 changed files with 999 additions and 743 deletions

View File

@@ -264,7 +264,7 @@ macos:
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
vs2017-x64:
vs2019-x64:
# TODO: Uncomment this when ready to merge.
# rules:
# - if: $CI_PROJECT_NAMESPACE == "GNOME"

View File

@@ -1,7 +1,7 @@
@echo on
:: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
:: specified build architecture
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
@echo on
pip3 install --upgrade --user meson~=1.2 || goto :error

29
NEWS
View File

@@ -1,4 +1,7 @@
Overview of Changes in 4.17.0, xx-xx-xxxx
Overview of Changes in 4.17.1, xx-xx-xxxx
=========================================
Overview of Changes in 4.17.0, 06-11-2024
=========================================
* GtkScrolledWindow
@@ -7,6 +10,9 @@ Overview of Changes in 4.17.0, xx-xx-xxxx
* GtkFileChooser
- Fix a crash in the portal code
* GtkFontChoser
- Make the dialog more shrinkable
* GtkPicture
- Avoid unnecessary resizes
@@ -22,15 +28,26 @@ Overview of Changes in 4.17.0, xx-xx-xxxx
* GtkStringList:
- Add gtk_string_list_find
* GtkApplication:
- Respect GDK_DEBUG=no-portals
- Set default window icon from app ID
* GtkTextView:
- Vertical and horizontal positioning of the textview is now quantized
to the nearest device pixel. This should improve the perceived smoothness
of scrolling with fractional scaling and font hinting.
- Incorrect re-use of cached styling was fixed
- Fix some missing CSS invalidation
- Handle charsets in clipboard datatypes
* Printing:
- Avoid warnings for avahi errors
- Fix a segfault in the print dialog setup code
* Accessibility:
- Always realize non-widget accessibles, to help webkit
- Fix list view selection implementation
- Handle NULL values in more places
* Gstreamer:
- Make dmabufs works without GL
@@ -57,15 +74,22 @@ Overview of Changes in 4.17.0, xx-xx-xxxx
- Use a viewporter for cursor image scaling
- Improve cursor size handling
- Use the system bell protocol if available
- Fix possible deadlock with high-priority sources triggering Wayland roundtrips
- Fix possible deadlock with high-priority sources triggering roundtrips
* Windows:
- Improve the backend code
- Fix some problems with WGL on NVidia
- Many testsuite fixes for Windows compatibility
- Make all pixbuf loaders builtin in the gdk-pixbuf subproject
- Add GDK_DISABLE=aerosnap to disable aerosnap
- Improve clipboard handling
- Fix behavior or gdk_display_open() on Windows
- Numerous papercut fixes
- Require Windows 10
* Macos:
- Fix crashes when dragging libadwaita TabView tabs
- Require macOS 10.15
* Tools and demos
- gtk4-demo: Make demos standalone
@@ -83,6 +107,7 @@ Overview of Changes in 4.17.0, xx-xx-xxxx
Brazilian Portuguese
British English
Galician
Lithuanian
Romanian
Slovenian
Swedish

View File

@@ -1,22 +0,0 @@
/* gdkconfig.h
*
* This is a generated file. Please modify `configure.ac'
*/
#ifndef __GDKCONFIG_H__
#define __GDKCONFIG_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#include <glib.h>
G_BEGIN_DECLS
#define GDK_WINDOWING_WIN32
G_END_DECLS
#endif /* __GDKCONFIG_H__ */

View File

@@ -1,23 +0,0 @@
/* gdkconfig.h
*
* This is a generated file. Please modify `configure.ac'
*/
#ifndef __GDKCONFIG_H__
#define __GDKCONFIG_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#include <glib.h>
G_BEGIN_DECLS
#define GDK_WINDOWING_WIN32
#define GDK_RENDERING_VULKAN
G_END_DECLS
#endif /* __GDKCONFIG_H__ */

View File

@@ -656,25 +656,17 @@ gdk_win32_display_get_name (GdkDisplay *display)
static void
gdk_win32_display_beep (GdkDisplay *display)
{
g_return_if_fail (display == gdk_display_get_default());
if (!MessageBeep (-1))
Beep(1000, 50);
MessageBeep ((UINT)-1);
}
static void
gdk_win32_display_flush (GdkDisplay * display)
{
g_return_if_fail (display == gdk_display_get_default());
GdiFlush ();
}
static void
gdk_win32_display_sync (GdkDisplay * display)
{
g_return_if_fail (display == gdk_display_get_default());
GdiFlush ();
}
static void

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) &&
@@ -3078,7 +3080,12 @@ gdk_event_translate (MSG *msg,
/* Call modal timer immediate so that we repaint faster after a resize. */
if (GDK_WIN32_DISPLAY (gdk_surface_get_display (surface))->display_surface_record->modal_operation_in_progress & GDK_WIN32_MODAL_OP_SIZEMOVE_MASK)
modal_timer_proc (0,0,0,0);
{
modal_timer_proc (msg->hwnd,
msg->message,
(UINT_PTR)surface,
msg->time);
}
/* Claim as handled, so that WM_SIZE and WM_MOVE are avoided */
return_val = TRUE;

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

@@ -2,8 +2,8 @@
<interface domain="gtk40">
<template class="GtkFontChooserDialog" parent="GtkDialog">
<property name="title" translatable="yes">Select Font</property>
<property name="default-width" translatable="yes">400</property>
<property name="default-height" translatable="yes">500</property>
<property name="default-width">400</property>
<property name="default-height">500</property>
<style>
<class name="fontchooser"/>
</style>

View File

@@ -1,5 +1,5 @@
project('gtk', 'c',
version: '4.17.0',
version: '4.17.1',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',

1621
po/sr.po

File diff suppressed because it is too large Load Diff

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;
}

View File

@@ -46,7 +46,7 @@ usage (void)
" render Take a screenshot of the file\n"
" screenshot Take a screenshot of the file\n"
"\n"));
exit (1);
exit (0);
}
static GLogWriterOutput

View File

@@ -45,7 +45,7 @@ usage (void)
" relabel Change the color state of the image without conversion\n"
" show Show the image\n"
"\n"));
exit (1);
exit (0);
}
static GLogWriterOutput

View File

@@ -45,7 +45,7 @@ usage (void)
" render Render the path as an image\n"
" info Print information about the path\n"
"\n"));
exit (1);
exit (0);
}
static GLogWriterOutput

View File

@@ -45,7 +45,7 @@ usage (void)
" show Show the node\n"
" render Take a screenshot of the node\n"
"\n"));
exit (1);
exit (0);
}
static GLogWriterOutput