Christian Hergert
e317b9be00
macos: maintain GList element consistency
...
We need to keep this consistent so that we can look things up
faster in other places. Therefore, just take the hit here and clear
the entire list ensuring prev/next poniters are cleared.
2020-12-02 19:44:01 -08:00
Christian Hergert
2e52386be5
macos: send focus-out event to windowing
2020-12-02 19:44:01 -08:00
Christian Hergert
9431c70a6a
macos: freeze updates until surface is mapped
...
This more closely matches the X11 backend in terms of freezing
updates on the surface initially until we get mapped.
2020-12-02 19:44:01 -08:00
Matthias Clasen
61b40c47f9
Merge branch 'fix/keyboard-input' into 'master'
...
Gdk4/Win32: Correct calls to gdk_key_event_new()
See merge request GNOME/gtk!2903
2020-12-02 22:14:27 +00:00
Matthew Jakeman
710d0620a4
Gdk4/Win32: Correct call to gdk_key_event_new()
...
The keycode and modifier (state) parameters are in the wrong order
for gdk_key_event_new() in the gdk win32 backend, which causes
key up/down events to be populated incorrectly.
2020-12-02 22:14:27 +00:00
Matthias Clasen
a482d870dd
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
Revert "macos: specify a window level for surfaces"
See merge request GNOME/gtk!2908
2020-12-02 20:15:51 +00:00
Christian Hergert
b38d0d7d9e
macos: resign main/key when hiding window
...
This isn't done automatically for us, so we need to synthesize it in
our hide helper.
With this commit, we properly re-focus the new main/key window after
we have closed a transient-for window.
2020-12-02 11:36:38 -08:00
Christian Hergert
853a9c7a8c
macos: disconnect frame clock when destroying surface
2020-12-02 11:35:02 -08:00
Christian Hergert
26b9254ac7
macos: track grab serial like other backends
...
This is what is done elsewhere, so copy that here too now that we actually
generate serials for events.
2020-12-02 11:34:31 -08:00
Christian Hergert
f11c23f407
Revert "macos: specify a window level for surfaces"
...
This reverts commit ca8b00e871
.
This isn't needed and causes issues with other applications getting
stacked beneath our windows.
2020-12-02 11:15:57 -08:00
Emmanuele Bassi
3548350dfa
docs: Add missing GdkDragSurfaceInterface gtk-doc annotation
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
4caceb5dd4
Remove gtk-doc annotation from private symbols
...
Keep the documentation, just tweak it so that gtk-doc won't try to find
the declarations of these private symbols.
2020-12-02 19:05:41 +00:00
Christian Hergert
9b9fb4d7a3
macos: place above transient-for when presenting
...
We need to re-attach to the transient-for window whenever we present or
we risk getting placed behind the window by the display server. Apparently
that setting does not persist across a hide of the NSWindow.
2020-12-02 10:21:16 -08:00
Christian Hergert
ca8b00e871
macos: specify a window level for surfaces
2020-12-02 10:15:43 -08:00
Emmanuele Bassi
2fcd0e21bd
Merge branch 'ebassi/for-master' into 'master'
...
Various documentation fixes
See merge request GNOME/gtk!2900
2020-12-02 13:40:25 +00:00
Christian Hergert
27b9a9e7ef
macos: glFlush() when switching GL contexts
...
The Mac OpenGL programming guide suggests that you glFlush() before changing
contexts to ensure that the commands have been submitted.
2020-12-01 16:19:04 -08:00
Christian Hergert
a020c901ba
macos: treat some toplevel NSWindow like document windows
...
This makes the window animate in by the window manager like other
application windows on macOS. Currently ignored for transient windows.
2020-12-01 16:19:04 -08:00
Emmanuele Bassi
b5313dbd4d
docs: Annotate GdkDeviceTool
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
b9a1827da7
docs: Annotate GdkGLTexture
2020-12-01 13:48:07 +00:00
Emmanuele Bassi
1057189ea2
docs: Annotate GdkMemoryTexture
2020-12-01 13:47:56 +00:00
Emmanuele Bassi
879b2845ad
docs: Annotate GdkPaintable
...
The dummy typedef needs a gtk-doc stanza, and the interface
documentation needs to be slightly clarified.
2020-12-01 13:44:51 +00:00
Emmanuele Bassi
ecce3756d4
docs: Annotate GdkPopup
2020-12-01 13:42:07 +00:00
Emmanuele Bassi
6e4dd5811d
docs: Annotate GdkSnapshot
2020-12-01 13:41:28 +00:00
Emmanuele Bassi
598e1304f6
docs: Annotate the GdkToplevel interface
2020-12-01 13:39:48 +00:00
Emmanuele Bassi
e3fbc0ee9c
docs: Fix typo in the GdkTolevelLayout annotation
2020-12-01 13:38:33 +00:00
Emmanuele Bassi
4021734047
docs: Annotate the GdkContentProviderClass structure
2020-12-01 13:38:12 +00:00
Benjamin Beichler
8efde9c48c
broadway: make header name parsing case-insensitve
...
since http RFC state that the header names should be processed case in-sensitive, broadway should not rely on the actual case. E.g. the go-language libraries tend to rewrite the header, which cause problems with e.g. Caddy
Fixes #3406
2020-11-27 12:05:51 +01:00
Volker Rümelin
7190a31b5f
gdk/win32: fix integer overflow in monitor refresh rate calculation
...
In gdk/win32/gdkmonitor-win32.c in function
populate_monitor_devices_from_display_config() refresh->Numerator * 1000
overflows for refresh->Numerator > 4294976.
Cast the factor 1000 to UINT64 to prevent the overflow.
Fixes #3394
2020-11-23 21:42:58 +01:00
Christian Hergert
f32ae2964a
macos: fix various compiler warnings
2020-11-18 20:16:37 -08:00
Matthias Clasen
7551f85d4c
Merge branch 'wayland-minimize' into 'master'
...
wayland: Implement minimization
Closes #2688
See merge request GNOME/gtk!2861
2020-11-18 14:23:56 +00:00
Matthias Clasen
b3243132a0
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix rendering artifacts with hover transitions
See merge request GNOME/gtk!2862
2020-11-18 03:04:01 +00:00
Christian Hergert
dd7f52c59a
macos: fix rendering artifacts with hover transitions
...
Using an image surface seems to fix some rendering artifacts when
performing cross-fade CSS transitions.
2020-11-17 18:20:55 -08:00
Matthias Clasen
3f1bc740e4
wayland: Implement minimization
...
Use the set_minimized method of the xdg_toplevel
interface to implement minimization as well as possible.
It is not possible, since there is no corresponding
state that we could use to update our surface state,
but in practice, it works well enough.
Fixes : #2688
2020-11-17 19:57:56 -05:00
Carlos Garnacho
745cbc6c91
gdk/wayland: Update to gtk_shell1 version 3
...
Bring in line with gtk3, in terms of startup notification and
activation support.
2020-11-18 00:41:46 +01:00
Emmanuele Bassi
ade2f1030a
Annotate GdkTimeCoord's array field
...
We need to resolve the array length manually, because g-ir-scanner
cannot turn an enumeration member into a constant size.
2020-11-17 14:07:11 +00:00
Emmanuele Bassi
9941799449
Annotate out argument for gdk_popup_layout_get_offset()
2020-11-17 13:52:15 +00:00
Qiu Wenbo
437f902c9d
Fix a warning caused by difference between prototype and definition
...
This commit fix the warning:
../gdk/wayland/gdkdisplay-wayland.c:1079: Warning: GdkWayland: gdk_wayland_display_set_cursor_theme: unknown parameter 'name' in documentation comment, should be 'theme'
2020-11-17 14:59:14 +08:00
Matthias Clasen
1d86086434
gdk: Docs cosmetics
...
Add a few missing parameters in doc comments.
2020-11-16 07:44:17 -05:00
Christoph Reiter
afc73c38ce
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode
...
Currently GTK can be built with G_ENABLE_DEBUG which enables various debug code and parsing
of those env vars, or without, which instead of parsing them prints a warning if they are set.
While building with G_ENABLE_DEBUG isn't strictly needed it's the only way to make GTK_DEBUG=interactive work,
which is a nice thing to have always.
This enables parsing of those env vars in any case and allows specific values being marked as also
available when not built with G_ENABLE_DEBUG (interactive for example). If not built with G_ENABLE_DEBUG
then all unavailable values will be marked as such in the help output and a note is added that
GTK needs to be built with G_ENABLE_DEBUG to use them, which should help discoverability.
2020-11-15 11:34:54 +01:00
Matthias Clasen
d63afaf5ad
x11: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:01 -05:00
Matthias Clasen
7e089664fc
win32: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:06:37 -05:00
Matthias Clasen
06fbad0b26
wayland: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:05:55 -05:00
Matthias Clasen
0d82faa239
Merge branch 'wip/carlosg/for-master' into 'master'
...
Text handle fixes
Closes #3176
See merge request GNOME/gtk!2785
2020-11-06 01:23:16 +00:00
Christian Hergert
90141ef305
macos: use NSOpenGLContext directly for current tracking
...
We don't need to interact with GdkGLContext here to keep the
current context active.
2020-11-05 13:57:41 -08:00
Christian Hergert
bc05da8dc0
macos: explicitly request color and alpha sizes
2020-11-05 13:37:25 -08:00
Christian Hergert
bf3e1e5b40
macos: use opaque GL context when possible
...
This is better for situations where the window is decorated and therefore we can
rely on window system clipping of rounded corners.
2020-11-05 13:34:29 -08:00
Carlos Garnacho
80f5be8b13
gdk/wayland: Ensure to update input area on map
...
If a surface is hidden, then shown again, it should preserve the
input area specified. Make sure that happens.
2020-11-05 21:29:20 +01:00
Matthias Clasen
d526bcc71b
Cosmetics
...
Fix argument ordering of gdk_cursor_new_from_name.
2020-11-04 23:36:09 -05:00
Matthias Clasen
7f16067383
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: gl context improvements and event cleanup
See merge request GNOME/gtk!2780
2020-11-05 02:21:02 +00:00
Christian Hergert
c31c3848df
macos: fix calculation of mouse position
...
This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
2020-11-04 18:03:54 -08:00