Commit Graph

51211 Commits

Author SHA1 Message Date
Chun-wei Fan
171ff43340 tests: Include system headers appropriately
Don't include unistd.h on Windows, and include the appropriate headers on
Windows as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-07-21 23:36:03 +08:00
Chun-wei Fan
4d3aa827f6 tests/rendernode-create-tests.c: Don't use VLAs
Replace uses of VLAs (variable-length arrays) using g_newa(), since
Visual Studio builds will unlikely ever support VLAs (which became optional
in C11).

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-07-21 23:35:54 +08:00
Chun-wei Fan
73e81b64b6 gtk/gtkprintoperation-win32.c: Don't call gtk_widget_set_allocation()
This function was removed recently.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-07-21 23:35:38 +08:00
Jason Gerecke
837c2002e9 wayland: Implement support for tablet wheel scrolling
Adds support for creating scroll events from Wayland tablet wheel events.
Even though no Wacom tablet puck has a smooth-scrolling wheel, both event
types need to be generated to make the upper layers happy.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-20 14:27:28 +02:00
Carlos Garnacho
3be5aae56a wayland: Make function to create scroll event more generic
Add GdkWaylandPointerData and GdkDevice arguments so it can be
used across master devices.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-20 14:27:28 +02:00
Jason Gerecke
8419b51cc3 wayland: Get implicit grab serial information from tablet devices
If a tablet device is used to perform actions like window moving or resizing,
GTK must provide the correct implicit grab serial number over Wayland to Mutter
in order for the action to succeed. This commit adds tablet support to the
implicit serial getters.

https://bugzilla.gnome.org/show_bug.cgi?id=777333
2017-07-20 14:27:28 +02:00
Timm Bäder
500d25e3c8 gdkgears: Add window content spacing back
This was lost when border-width was removed.
2017-07-20 12:41:12 +02:00
Timm Bäder
e92eebb434 overlay: Fix child widget allocation
Just adding the overlay's own position is wrong now.
2017-07-20 12:40:46 +02:00
Timm Bäder
c3176ed302 overlay: Keep the main child at the bottom
Since gtk_bin_add does a gtk_widget_set_parent call, we cannot use it in
a GtkBin implementation that has multiple child widgets and cares about
their order.
2017-07-20 12:33:57 +02:00
Matthias Clasen
953e762843 Move GdkWindowWindowClass to private headers
This enum is no longer used in public api.
2017-07-19 23:11:12 -04:00
Matthias Clasen
394c21da98 Drop an unused typedef
GdkWindowRedirect is not used anywhere anymore.
2017-07-19 23:11:12 -04:00
Jonas Ådahl
f6dd1f6ceb wayland: Throttle system bell requests
If a bad behaving application tries to make the window/display beep too
often, throttle the beep requests so that we don't end up filling the
Wayland socket queue.

The throttle is set to 50 beeps per second, which far more beeps than
will ever make any sense from a user experience point of view, but will
avoid terminating due to an excessive amount of requests.

https://bugzilla.gnome.org/show_bug.cgi?id=778188
2017-07-20 09:58:10 +08:00
Jonas Ådahl
96295ad8c5 wayland: Make beep requests go through the GdkDisplay
This way we can add things like throttling.

https://bugzilla.gnome.org/show_bug.cgi?id=778188
2017-07-20 09:58:10 +08:00
Matthias Clasen
c715683643 Summarize changes so far
This is a high-level view of what was just merged.
2017-07-19 21:52:10 -04:00
Timm Bäder
52875b7639 testgtk: Remove unused local variable 2017-07-19 21:27:16 -04:00
Timm Bäder
f537d36d0a GtkStyleContext: Create path node in _new
So we can avoid creating a GtkCssPathNode in _init and then throwing it
away right after when using the _new_with_node constructor, which is the
one we use for all widgets.
2017-07-19 21:27:16 -04:00
Timm Bäder
fc47be9339 GtkStyleContext: Remove property cache
It was only used for widget style properties which don't exist anymore.
2017-07-19 21:27:16 -04:00
Timm Bäder
4cf39f65b2 widget-factory: fix page 3 widget expand
The treeview/listbox on the left side should not expand.
2017-07-19 21:27:16 -04:00
Timm Bäder
bf22dea2ce GdkWindow: Default to unfocused
Don't set the have_focused field of the window's toplevel to TRUE by
default and don't set the FOCUSED state in gdk_window_map. This a means
toplevel window's state is what the WM expects, and the FOCUSED state
will be set anyway when we map the window and receive a _NET_WM_STATE
message.
2017-07-19 21:27:16 -04:00
Timm Bäder
9bf5def6b7 statusbar: Inherit from GtkWidget 2017-07-19 21:27:16 -04:00
Timm Bäder
4a4c7131fd modelmenuitem: Care about GtkAccelLabel in get_text 2017-07-19 21:27:16 -04:00
Timm Bäder
8a26e8a6ba modelmenuitem: Update indicator visibility when has_indicator changes 2017-07-19 21:27:16 -04:00
Timm Bäder
2f1d962e56 menushell: Hide model submenus by default 2017-07-19 21:27:16 -04:00
Timm Bäder
b1354a184b GtkCheckMenuItem: Remove snapshot-indicator vfunc
Let the widget snapshot all child widgets and control the visibility of
those child widgets instead.
2017-07-19 21:27:16 -04:00
Timm Bäder
ed5192497f label: Remove GtkEventBox mention from docs
Packing the label inside a GtkEventBox is not necessary anymore for it
to receive events.
2017-07-19 21:27:16 -04:00
Timm Bäder
584d613bfd image: Remove irrelevant code sample
Both the description and the sample itself are obsolete or uninteresting
now that all widgets can receive events.
2017-07-19 21:27:16 -04:00
Timm Bäder
d31621256d spinbutton: Fix css node docs 2017-07-19 21:27:16 -04:00
Timm Bäder
2c3ec49535 treeview: Fix row drag icon offsets 2017-07-19 21:27:16 -04:00
Timm Bäder
d836fa5134 treeviewcolumn: Remove input window 2017-07-19 21:27:16 -04:00
Timm Bäder
bd446c48e9 spinbutton: expand the entry
It's supposed to fill the entire spinbutton allocation apart from the
buttons
2017-07-19 21:27:16 -04:00
Timm Bäder
efccff70b7 Adwaita: Set minimum size for modelbutton arrows
Otherwise the minimum size is 1×1.
2017-07-19 21:27:16 -04:00
Timm Bäder
348871d9fc Fix a few testsuite failures
Adjust default property values, skip GtkRange:adjustment.
2017-07-19 21:27:16 -04:00
Timm Bäder
5720f2a845 widget: Make _set_clip private
We don't need this anymore since clips are now reported in
size-allocate.
2017-07-19 21:27:16 -04:00
Timm Bäder
28dae5f1c2 checkmenuitem: Don't always snapshot the indicator
Chaining up will snapshot all child widgets, which doesn't work with
GtkModelMenuItem.
2017-07-19 21:27:16 -04:00
Timm Bäder
8358817ad1 applicationwindow: Remove some useless queue_resize calls
The gtk_widget_{set_parent,unparent} calls before will already cause a
resize when necessary.
2017-07-19 21:27:16 -04:00
Timm Bäder
308f41487d modelmenuitem: Set label on menu items
We have to add a check for GTK_IS_ACCEL_LABEL too now...
2017-07-19 21:27:16 -04:00
Timm Bäder
5116ce19b7 widget: Remove queue_draw_region vfunc
Unused
2017-07-19 21:27:16 -04:00
Timm Bäder
65209da486 widget: Set :focus on focus children 2017-07-19 21:27:16 -04:00
Timm Bäder
d7056f5d22 revealer: Explain CSS oddities 2017-07-19 21:27:16 -04:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
95bd58ac00 widget: Don't propagate size-allocate if only the position changed
We can do this now so we should
2017-07-19 21:27:15 -04:00
Timm Bäder
2e6b1158ee widget: Fix priv dereference in size_allocate_with_baseline
Accessing ->priv is only safe *after* the GTK_IS_WIDGET precondition, so
use the get_instance_private function instead.
2017-07-19 21:27:15 -04:00
Timm Bäder
6d9a0d432a widget: Fix a widget/container mixup 2017-07-19 21:27:15 -04:00
Timm Bäder
3aeaeef070 window: Fix resizing with solid-csd
We can't use a 20px resize handle in that case so fall back to the
padding area of the window. Still ugly but it works.
2017-07-19 21:27:15 -04:00
Timm Bäder
edf0aeb92e gtkapplication: g_dbus_proxy_new_sync can return NULL
Specifically, in the case where @error is set.
2017-07-19 21:27:15 -04:00
Timm Bäder
5fb27e2bd7 window: Fix annotations in get_size and get_position 2017-07-19 21:27:15 -04:00
Timm Bäder
0ebd8840a8 widget: Remove gtk_cairo_transform_to_window
Useless in a world without windows and cairo.
2017-07-19 21:27:15 -04:00
Timm Bäder
f637006b3e popover: Add a contents node
Remove the special case in gtkwidget.c where we didn't draw any css
background/border for popovers. Instead, rely on themes to not style the
popover node and add a contents gizmo that gets the actual css styling.
We then requeste enough space for the popover to draw both the contents
and the arrow on the side.
2017-07-19 21:27:15 -04:00
Timm Bäder
097ab2baed widget: Draw css box after pushing a opacity node 2017-07-19 21:27:15 -04:00
Timm Bäder
e2e91bf9bc Fix a few documentation issues 2017-07-19 21:27:15 -04:00