Commit Graph

10757 Commits

Author SHA1 Message Date
Luca Bacci
440929daea GdkWin32: Add more GDK_NOTE calls for settings 2022-11-04 16:11:27 +01:00
Luca Bacci
1506de5669 GdkWin32: Set the "gtk-hint-font-metrics" property
Helps for https://gitlab.gnome.org/GNOME/gtk/-/issues/5257
2022-11-04 16:03:11 +01:00
Luca Bacci
41f9f1d623 GdkWin32: Set the "gtk-cursor-blink" setting 2022-11-04 15:57:25 +01:00
Luca Bacci
24047d7f61 GdkWin32: Set the "gtk-cursor-theme-size" setting
Note that we have to set the logical value, that's why
we use GetSystemMetrics and not GetSystemMetricsForDpi.
2022-11-04 15:56:20 +01:00
Luca Bacci
45681c4fe5 GdkWin32: Detect the high contrast setting
And set the theme name accordingly ("Default-hc")
2022-11-04 15:54:02 +01:00
Luca Bacci
95c121b6d6 GdkWin32: Fix leak of screen HDC 2022-11-04 15:41:11 +01:00
Luca Bacci
6b569afdfe GdkWin32: Remove special-casing for old Pango versions
We require Pango 1.50 now
2022-11-04 15:35:04 +01:00
Luca Bacci
429017ad16 GdkWin32: Remove old code 2022-11-04 15:31:40 +01:00
Luca Bacci
fe1d86f23c GdkWin32: Sort settings alphabetically 2022-11-04 15:30:12 +01:00
Matthias Clasen
16b95939f9 gdk: Bump the jpeg malloc limit
Bump the limit for memory use during jpeg loading
to 1GB, matching what gdk-pixbuf has for this.
2022-10-31 20:35:15 -04:00
Matthias Clasen
1894a8960e wayland: Fix keycode->keyval mapping
We were looping over the levels, but not using
the current level value to obtain the keymap
entries. Oops.

Fixes: #5277
2022-10-19 15:46:27 -04:00
Carlos Garnacho
eeda25ab04 gdk/wayland: Use serial of the latest implicit grab available
When getting the serial for primary/clipboard selections we used a
function that largely relied on a GdkEvent being passed. We have
another available function that looks up the most recent serial
given the ongoing touch/tablet input as well.

This is the second best, compared to actually knowing the
input/device from the event that was received by the UI an triggered
the clipboard operation, and is already in use in other places
(e.g. window dragging). It is valid for these situations too.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5250
2022-10-19 13:54:07 +02:00
Luca Bacci
995f00d23f Merge branch 'forward-port-mr-991-to-gtk4-2' into 'main'
Use native Windows API for converting keystrokes to characters

Closes #2944

See merge request GNOME/gtk!4986
2022-10-17 19:20:08 +00:00
Philip Zander
c84c469b78 Use native Windows API for converting keystrokes to characters 2022-10-17 19:36:48 +02:00
Matthias Clasen
6f5d18a9f5 macos: Fix clipboard data size handling
We were using the allocated memory size, not
the amount of data that has been written.

Fixes: #5261
2022-10-16 23:45:28 -04:00
Luca Bacci
6cc44eb0fe Merge branch 'for-master' into 'main'
For master

See merge request GNOME/gtk!5095
2022-10-12 13:56:51 +00:00
Matthias Clasen
8ba7840528 Merge branch 'wip/corey/file-clipboard' into 'main'
gdkcontentserializer: Use newlines for file separators

Closes #5240

See merge request GNOME/gtk!5107
2022-10-10 21:13:28 +00:00
Corey Berla
3168a3e086 gdkcontentserializer: Use newlines for file separators
Use newlines rather than spaces to separate file paths (or uri's)
when serializing text/plain files.  There isn't a matching
deserializer, so we can do this in isolation.  Newlines
seem to make more sense when pasting into a text editor etc.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5240
2022-10-10 13:27:07 -07:00
Luca Bacci
d6f7449636 GdkWin32: Return TRUE when processing WM_XBUTTONDOWN/UP messages
As documented on MSDN:

> Unlike the WM_LBUTTONUP, WM_MBUTTONUP, and WM_RBUTTONUP messages, an
> application should return TRUE from this message if it processes it.
2022-10-07 19:05:29 +02:00
Luca Bacci
f4286e8f1a GdkWin32: Use gdk_pixbuf_read_pixels () where applicable
This is an optimization in case of reading unmodifiable GdkPixbufs.
Also replace uses of GLib integral types with <stdlib.h> integral
types.
2022-10-07 19:05:29 +02:00
Po Lu
e967dfed2d
Treat XKB_MOD_NAME_LOGO as super key 2022-10-06 11:19:31 +04:00
Matthias Clasen
8607312fef gdk: Cosmetics
Add a define for each renderer.
2022-10-05 23:01:28 -04:00
Jonas Ådahl
b3a3a6ceb1 toplevel-size: Report zero bounds as infinite
Empty/zero bounds are sent by the Wayland compositor if there are no
valid bounds to report, e.g. if there are no connected monitors. Report
this to GTK, which uses this to clamp calculated sizes, as INT_MAX, so
that clamping isn't done until there are actual valid bounds to clamp
to.

This fixes clients sometimes shrinking to their minimum size during
hotplugs or after having suspended the session.
2022-09-30 09:31:40 +02:00
Jonas Ådahl
148c133674 surface/wayland: Handle no current monitor when calculating bounds
We shouldn't assume there is always a monitor to derive bounds from.
If there is no monitor, pass empty bounds, as this matches what
xdg_toplevel.configure_bounds do in this case.
2022-09-30 09:31:40 +02:00
Matthias Clasen
0c02573c47 Add 4.10 version macros 2022-09-28 13:30:01 -04:00
Matthias Clasen
dd7cd6ffdd Add more names to sources
This helps with identifying things in sysprof logs,
and while debugging.
2022-09-28 12:37:21 -04:00
Matthias Clasen
5f469d8903 Merge branch 'broadway-device-query-state-fix' into 'main'
GTK4 gdk/broadway: correct gdk_broadway_device_query_state() to return pointer coordinates relative to the upper left corner of surface

See merge request GNOME/gtk!5053
2022-09-28 01:38:45 +00:00
Luca Bacci
e2219858ae GdkWin32: Fix subclassing for GdkWin32Clipdrop
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5207
2022-09-26 14:34:24 +02:00
Matthias Clasen
455eefa854 gdk: Use gnome.mkenums_simple
This lets us avoid template files, and works just as well.
2022-09-24 21:22:53 -04:00
Matthias Clasen
bc661a8ed5 gdk: Rename gdkpixbuf-drawable.c
There is nothing particularly specific to drawables
in there (and we don't have that concept anymore),
so just name the source file to match the header.
Easier for everybody.
2022-09-24 10:03:37 -04:00
Matthias Clasen
9ff549799d gdk: Tweaks to keyname handling
Rename the private header to follow our naming
conventions, and drop the extra gdkkeys.c file.
2022-09-24 10:03:37 -04:00
Matthias Clasen
4aabc45685 Drop gdkintl.h
This header was merely including gi18n-lib.h.
Just do that directly.
2022-09-23 23:33:42 -04:00
Matthias Clasen
a8af7caae1 Rename gdk-private.h to gdkprivate.h
The extra - does not add any value.
2022-09-23 23:23:27 -04:00
Matthias Clasen
7d2c296357 Rename gdkconstructor.h to gdkconstructorprivate.h
This is the naming convention for private headers.
2022-09-23 23:14:08 -04:00
Matthias Clasen
c24a69549d Rename gdkdebug.h to gdkdebugprivate.h
This is the naming convention for private headers.
2022-09-23 23:12:01 -04:00
Matthias Clasen
61a51dea7b gdk: Dissolve gdk-autocleanup.h
Move the autocleanup declarations into their
respective headers.

While we are at it, correct the autocleanup
declaration for GdkEvent to use gdk_event_unref,
not g_object_unref. Oops
2022-09-23 19:49:58 -04:00
Matthias Clasen
f33f55bcbb gtk: Use the new debug macros 2022-09-23 18:12:39 -04:00
Matthias Clasen
bc159207bd gdk: Drop old debug macros
Drop the old GDK_NOTE() and GDK_DISPLAY_NOTE()
macros from gdkdebug.h. Reintroduce them in the
win32 backend, where they are still used.
2022-09-23 18:11:48 -04:00
Matthias Clasen
1f166ae071 macos: Use the new debug macros 2022-09-23 18:11:48 -04:00
Matthias Clasen
ce4c2154f4 x11: Use the new debug macros 2022-09-23 18:11:48 -04:00
Matthias Clasen
71fedee85d wayland: Use the new debug macros 2022-09-23 18:11:48 -04:00
Matthias Clasen
90c2b548e5 broadway: Use the new debug macros 2022-09-23 18:11:48 -04:00
Matthias Clasen
1d48f96fc5 gdk: Use the new debug macros 2022-09-23 18:11:48 -04:00
Matthias Clasen
10255eee72 Introduce new debug macros
Introduce GDK_DISPLAY_DEBUG() and GDK_DEBUG() and
the helper function gdk_debug_message(). This is
meant to clean up the mess of our current debug
statements which wildly mix g_message, g_print
and g_printerr.
2022-09-23 18:11:48 -04:00
Matthias Clasen
c7a7e550dc Only print supported debug flags
It is a bit disorienting to print a lot of unavailable
debug flags, with some working ones mixed in. Just show
the ones that work.
2022-09-21 21:51:58 -04:00
Matthias Clasen
55ab99cb98 Make GL flavor flags always available
No need to restrict this to debug builds.
2022-09-21 21:29:34 -04:00
Matthias Clasen
f50b0a0bcb Make the gl-debug debug flag always available
No need to restrict this to debug builds.
2022-09-21 21:17:16 -04:00
Matthias Clasen
01054c9c79 Make the gl-gles debug flag always available
No need to restrict this to debug builds.
2022-09-21 21:12:22 -04:00
Matthias Clasen
8bd3ec2ba1 Make the gl-legacy debug flag always available
No need to restrict this to debug builds.
2022-09-21 21:09:08 -04:00
Matthias Clasen
e08a9ea9ad Drop the gl-texture-rect debug flag
This was not doing anything.
2022-09-21 21:05:25 -04:00