Commit Graph

9678 Commits

Author SHA1 Message Date
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
Matthias Clasen
3785bf1f17 Merge branch 'fix-issue-2019-for-master' into 'master'
[master] GdkW32: remove klassTEMPSHADOW

Closes #2019

See merge request GNOME/gtk!2750
2020-11-05 01:53:02 +00:00
Christian Hergert
65b2ea1888 macos: resize extra GL window/view when surface changes
Once we figure out what is going on with textures, changes are we'll be
able to let this stay a zero rect. But that is still a bit up in the air right now.
2020-11-04 17:21:21 -08:00
Christian Hergert
6309bd12ac macos: clip damage when swapping buffers
This ensures that we only copy the changed area.
2020-11-04 17:21:17 -08:00
Christian Hergert
7444a151b2 macos: remove synthesize_motion helper
We can use gdk_surface_request_motion() now instead of our extra
helper to do essentially the same thing.
2020-11-04 16:58:50 -08:00
Christian Hergert
ce9cc2db86 macos: always create dummy window/view for GL context
This simplifies the creation by always creating the dummy views, and then
removes it if necessary by detecting the begin_frame/end_frame pair.
2020-11-04 16:52:12 -08:00
Christian Hergert
e91b930648 Revert "Simplify gdk_surface_queue_render"
This reverts commit 2120e9df88.
2020-11-04 16:28:13 -08:00
Matthias Clasen
d2cc9365fc Cosmetics
Extraneous pair of parens snuck in with 2120e9df88.
2020-11-04 14:59:27 -05:00
Matthias Clasen
dcfb6e5ef5 surface: Be smarter about autohide
When we close grabbing popups due to an outside
click, check at each level if the click is still
outside. This makes closing the nested popover
menu in the popover on page 3 of widget-factory
work as expected, when you click the menubutton
again.
2020-11-04 14:56:30 -05:00
Matthias Clasen
75f96b83de surface: Be more lenient for autohide
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
2020-11-04 14:56:30 -05:00
kai-berlin
499e4b4c50 broadway: Set modifier state of scroll events
Set modifier state of scroll events, so Ctrl-scroll
works.

Fixes: #2733
2020-11-03 19:21:00 -05:00