Benjamin Otte
f9562757ff
gtk-demo: Fix sliding puzzle demo
...
1. Menubuttons aren't buttons
2. For paintables without aspect ratios, use 1.0
2019-06-02 21:18:56 +02:00
Benjamin Otte
5a0c8805fc
transform: Coalesce similar transforms
...
If somebody does a transform like
scale(5) scale(10) translate(1,1) translate(5,0)
store it instead as
scale(50) translate(6,1)
This way, less memory is consumed and transforms are easier to read.
In particular, this simplifies the typical transforms we do in GTK,
which are just one translation after another.
2019-06-02 21:18:56 +02:00
Benjamin Otte
69629ebb1a
transform: Treat 0 perspective transforms as identity
...
This happens if you apply a perspective transform and its inverse, which
is the negative version of the perspective.
2019-06-02 15:12:37 +02:00
Benjamin Otte
22e0785802
build: Make script interpreter optional
...
Running the tests needs it though, so it's only optional without tests.
2019-05-30 18:34:51 +02:00
Benjamin Otte
7a3ffec762
docs: Fix build
2019-05-30 18:26:32 +02:00
Benjamin Otte
b9dc13ad99
Merge branch 'cairo-script-interpreter' into 'master'
...
rendernodeparser: Parse cairo script
See merge request GNOME/gtk!876
2019-05-30 15:48:02 +00:00
Benjamin Otte
53f23f8ae9
rendernodeparser: Handle empty Cairo nodes
...
Cairo nodes can contain a NULL surface if they have never been drawn to.
Make this the default Cairo node.
2019-05-30 15:32:36 +02:00
Benjamin Otte
1e0c0c0ba7
rendernodeparser: Parse cairo script
...
Use cairo-script-interpreter to parse the scripts that generate cairo
nodes.
This requires libcairoscriptinterpreter.so to work properly, but if
it isn't found we disable this (unimportant for normal functioning)
code and just emits a parser warning.
The testsuite requires it however or it will fail.
A new test is included that tests all of this.
2019-05-30 15:32:36 +02:00
Matthias Clasen
2f37207487
Remove leftover debug spew
2019-05-30 08:19:08 -04:00
Matthias Clasen
d71bf4d35c
Add gtknative.h to public headers
2019-05-30 08:18:29 -04:00
Matthias Clasen
93a34eb62d
Merge branch 'lr/builder-tool-templates' into 'master'
...
builder-tool: Rewrite GtkBuilder templates too
See merge request GNOME/gtk!888
2019-05-30 11:56:05 +00:00
Matthias Clasen
dad5da8028
Merge branch 'lr/builder-tool-assistant-crash' into 'master'
...
builder-tool: Set the parent of newly created GtkAssistantPage
See merge request GNOME/gtk!890
2019-05-30 11:48:59 +00:00
Lubomir Rintel
1e7225aa1c
builder-tool: Set the parent of newly created GtkAssistantPage
...
...and its property. Otherwise simplify_element() blows up when looking
up the hierarchy to determine a property type.
$ gtk4-builder-tool simplify --3to4 /dev/stdin <<EOF
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Generated with glade 3.20.2 -->
> <interface domain="nm-applet">
> <object class="GtkAssistant">
> <child>
> <object class="GtkBox" id="confirm_page">
> </object>
> <packing>
> <property name="page_type">confirm</property>
> <property name="complete">True</property>
> </packing>
> </child>
> </object>
> </interface>
> EOF
/dev/stdin: Packing property GtkAssistant::page_type not found
/dev/stdin: Packing property GtkAssistant::complete not found
Segmentation fault (core dumped)
2019-05-30 11:39:09 +02:00
Lubomir Rintel
2d55fce23d
builder-tool: Rewrite GtkBuilder templates too
2019-05-30 10:34:24 +02:00
Timm Bäder
78ee4c0677
gl renderer: Properly flip scaled fallback nodes
...
Fixes cairo nodes in hidpi setups
2019-05-30 09:12:45 +02:00
Matthias Clasen
d691393f5f
Merge branch 'wip/baedert/nodeeditor-fuckery' into 'master'
...
node editor: Add a quick way to save a testcase
See merge request GNOME/gtk!880
2019-05-30 03:28:41 +00:00
Matthias Clasen
3f6b64fc1d
Merge branch 'wip/chergert/sysprof-3' into 'master'
...
profiler: port GdkProfiler to sysprof-3
See merge request GNOME/gtk!886
2019-05-30 03:26:59 +00:00
Christian Hergert
3a0beeadc5
profiler: port GdkProfiler to sysprof-3
...
This uses the new sysprof-3 ABI to implement the capture writer. It also
uses the statically linked libsysprof-capture-3.a that is provided with
Sysprof for the capture writing to ensure that we do not leak any symbols
nor depend on any additional libraries.
The GTK_TRACE_FD can be used to pass a FD for tracing into Gtk. Sysprof
uses this when the Gtk instrument is selected for recording.
2019-05-29 19:02:30 -07:00
Matthias Clasen
853e832702
Merge branch 'shortcuts-sizing' into 'master'
...
Fix shortcuts window sizing
Closes #11
See merge request GNOME/gtk!885
2019-05-29 21:18:46 +00:00
Matthias Clasen
e0cc72e94f
Fix shortcuts window sizing
...
We were deferring the reflow until map, but this
leads to the section initially having an enormous
height and the window picks up that size before
we have a chance to reflow, This could be seen
in the "Builder" demo in gtk4-demo.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/11
2019-05-29 17:06:27 -04:00
Christian Hergert
82afe850e8
marshallers: add missing g_cclosure_marshal_VOID__VOID fixes
2019-05-29 13:48:33 -07:00
Matthias Clasen
164e362ec2
Merge branch 'wip/chergert/marshal-gtk4' into 'master'
...
marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
See merge request GNOME/gtk!883
2019-05-29 20:38:51 +00:00
Christian Hergert
f507a79056
marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
...
If we set c_marshaller manually, then g_signal_newv() will not setup a
va_marshaller for us. However, if we provide c_marshaller as NULL, it will
setup both the c_marshaller (to g_cclosure_marshal_VOID__VOID) and
va_marshaller (to g_cclosure_marshal_VOID__VOIDv) for us.
2019-05-29 13:22:31 -07:00
Matthias Clasen
90f330e27a
Merge branch 'gesture-click' into 'master'
...
Rename GtkGestureMultiPress to GtkGestureClick
See merge request GNOME/gtk!878
2019-05-29 18:39:09 +00:00
Timm Bäder
3874f37395
node editor: Add a quick way to save a testcase
2019-05-29 20:30:21 +02:00
Matthias Clasen
2be733497b
Merge branch 'global-coords' into 'master'
...
Drop global coordinates
See merge request GNOME/gtk!879
2019-05-29 18:29:57 +00:00
Matthias Clasen
200373f435
Mention event controller API in the migration guide
2019-05-29 14:17:07 -04:00
Matthias Clasen
d47434bdb6
Mention global coordinates in the migration guide
2019-05-29 18:11:57 +00:00
Matthias Clasen
792d578f4b
Cosmetics
...
Remove a doc comment for no-longer-public api.
2019-05-29 18:04:15 +00:00
Matthias Clasen
9ecd906b7f
Cosmetics
...
Drop a leftover declaration.
2019-05-29 18:04:13 +00:00
Matthias Clasen
51396533a1
Fix the win32 build
...
gdk_display_get_monitor_at_point was used
in this backend.
2019-05-29 18:04:13 +00:00
Matthias Clasen
b867cbe0d8
Cosmetics
...
Remove an unused variable.
2019-05-29 18:04:08 +00:00
Matthias Clasen
8ed27d6e3b
Drop gdk_surface_move
...
And its cousin, gdk_surface_move_resize.
These APIs are expecting global coordinates,
which are going away. GTK is not using them
anymore.
2019-05-29 18:04:08 +00:00
Matthias Clasen
956e94a8d4
Remove a misleading comment
...
We don't have windowed widgets anymore, and
gdk_surface_move_resize is about to go away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
2081bf346e
window: Remove move unused fields
...
position_constraints_changed is never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
74db7cbe00
window: Never call gdk_surface_move
...
With gtk_window_set_position gone, we should never
come up with a new position to set in this code.
Leave a warning in place and remove the gdk_surface_move
calls.
2019-05-29 18:04:08 +00:00
Matthias Clasen
d6d5d60703
Drop an empty function
...
gtk_window_constrain_position is not doing anything
anymore, so no need to call it.
2019-05-29 18:04:08 +00:00
Matthias Clasen
ece7fff339
window: Drop more unused fields
...
need_default_position is never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
147adc0bc5
window: Drop some unused fields
...
initial_x/y and initial_pos_set are never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
12da0a6db1
Drop gdk_device_get_position
...
Root coordinates are going away, so this
api does not make sense anymore. Use
gdk_surface_get_device_position instead.
We still keep this as internal api for
root-coordinate using backends.
2019-05-29 18:04:08 +00:00
Matthias Clasen
b636e32d85
widget: Stop using gdk_device_get_position
...
Root coordinates are going away. Stop
setting them in crossing events, so we
can drop this api.
2019-05-29 18:04:08 +00:00
Matthias Clasen
d515c43dce
Make gdk_surface_get_origin internal
...
We still use this function inside gdk in
a number of places, so keep it around.
2019-05-29 18:04:08 +00:00
Matthias Clasen
879f22fd27
Drop gdk_display_get_monitor_at_point
...
This api expects global coordinates, and
is unused.
2019-05-29 18:04:08 +00:00
Matthias Clasen
a8899cc6a3
window: Drop gtk_window_set_position
...
This is heavily using global coordinates, and
can't be guaranteed to work across wms / platforms.
2019-05-29 18:04:08 +00:00
Matthias Clasen
d2bc5b490a
tests: Stop using gtk_window_set_position
...
This api is going away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
4f9c1bf14e
gtk-demo: Stop using gtk_window_set_position
...
This api is going away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
987e7878a2
Drop gdk_surface_get_frame_extents
...
No longer used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
f0ef5332be
a11y: Stop using gdk_surface_get_frame_extnts
...
This api is going away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
0103c13632
x11: Set surface position correctly
...
The X backend was storing global coordinates
in surface->x/y, and keeping the parent-relative
positions in its own fields. Switch this around
to store the relative position in x/y, as is
expected by the frontend.
2019-05-29 18:04:08 +00:00
Matthias Clasen
fd048005f5
Clarify gdk_surface_get_position
...
This function returns the position relative to
the surface parent, so will always return 0 for
non-popups. The out arguments don't need to
allow-none either - nobody passes NULL for these.
2019-05-29 18:04:08 +00:00