Matthias Clasen
6d68c536f3
Add GtkStringSorter
...
This is a GtkSorter implementation collating strings
2020-05-30 19:26:44 -04:00
Matthias Clasen
e74a9d09e6
Add GtkCustomSorter
...
This is a GtkSorter implementation which uses a GCompareDataFunc.
2020-05-30 17:48:44 -04:00
Matthias Clasen
b2b847f365
Add GtkSorter
...
This is a helper object for sorting, similar to GtkFilter.
2020-05-30 17:48:44 -04:00
Benjamin Otte
cb15ec0257
Add GtkOrdering
...
This is an enum that we're gonna use soon and it's worth introducing as a
separate commit.
The intention is to have meaningful names for return values in
comparison functions.
2020-05-30 17:48:44 -04:00
Benjamin Otte
ad60efb5d7
expression: Invalidate bindings before destroying them
...
Use a weak ref to invalidate bindings. Make sure that this happens
before creating any watches, so that notifies from the
watched expression about changes will not trigger set_property() calls
during dispose()/finalize().
Invalidating also ensures that the watches aren't removed, which can
trigger warnings if the watches are watching the object itself, and the
weak refs cannot be removed anymore.
2020-05-30 17:48:44 -04:00
Benjamin Otte
b7efe4eb4f
expression: Add gtk_expression_bind()
...
Add a simple way to bind expressions to object properties. This is
essentially the thing to replace g_object_bind_property().
2020-05-30 17:48:44 -04:00
Benjamin Otte
ec742f9373
expression: Add the ability to watch an expression
2020-05-30 17:48:44 -04:00
Benjamin Otte
fde75aa9f6
builder: Add support for parsing expressions
2020-05-30 17:47:47 -04:00
Benjamin Otte
22659afd00
Add GtkMultiFilter, GtkAnyFilter, GtkEveryFilter
...
GtkMultiFilter is the abstract base class for managing multiple child
filter.
GtkAnyFilter and GtkEveryFilter are the actual implementations.
2020-05-30 17:42:09 -04:00
Benjamin Otte
410e7dcf5d
filter: Add GtkStringFilter
...
Users provide a search filter and an expression that evaluates the items
to a string and then the filter goes and matches those strings to the
search term.
2020-05-30 17:42:09 -04:00
Benjamin Otte
bd8655fdee
expression: Add GtkObjectExpression
...
Weak refs break cycles...
2020-05-30 17:42:09 -04:00
Benjamin Otte
e9f1ee5aab
Add GtkExpression
...
GtkExpressions allow looking up values from objects.
There are a few simple expressions, but the main one is the closure
expression that just calls a user-provided closure.
2020-05-30 17:42:08 -04:00
Benjamin Otte
4abdf695e3
filterlistmodel: Rewrite to use GtkFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
1ab081b584
Add GtkCustomFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
1df17f2fea
Add GtkFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
682e97826c
Add GtkDirectoryList
...
Adds a new listmodel called GtkDirectoryList that lists the children of
a GFile as GFileInfos.
This is supposed to be used by the filechooser.
2020-05-30 12:30:23 -04:00
Benjamin Otte
805fea20cb
eventcontrollermotion: Remove mode argument
...
It's not used and nobody has documented how it's meant to work anyway.
2020-05-30 12:30:23 -04:00
Matthias Clasen
2f20a40922
Merge branch 'matthiasc/for-master' into 'master'
...
Some listview preparations
See merge request GNOME/gtk!1988
2020-05-30 15:51:21 +00:00
Matthias Clasen
bb7f6ed544
Merge branch 'fix-gesture-leak' into 'master'
...
gesture: Don't leak target widgets
Closes #2801
See merge request GNOME/gtk!1986
2020-05-30 15:12:05 +00:00
Benjamin Otte
f1d6a0a4ed
widget: Add gtk_widget_get_size()
...
A little bit of convenience.
2020-05-30 10:48:02 -04:00
Benjamin Otte
1ef805328f
builder: Allow <property bind /> for objects
...
Previously, object properties had to always be set to a value.
This now works without it.
2020-05-30 10:46:27 -04:00
Matthias Clasen
3a8ebf4c9f
Merge branch 'wip/jimmac/backdrop-assasination' into 'master'
...
Adwaita: limit scope of :backdrop
Closes #2694
See merge request GNOME/gtk!1978
2020-05-30 14:41:52 +00:00
Matthias Clasen
0d69c42320
gesture: Don't leak target widgets
...
This was broken when we started tracking event targets
in dcbecdac31
.
Fixes : #2801
2020-05-30 09:47:24 -04:00
Matthias Clasen
66120cff4b
eventcontroller: Fix crossing event scopes
...
We want to deliver crossing events to controllers
with scope same-native as long as at least one of
the targets is on the same native. As a new approach,
treat out-of-scope targets like NULL, and deliver
crossing events as long as one of the targets is
not NULL.
2020-05-29 19:41:39 -04:00
Matthias Clasen
8ce1034e87
Add GTK_DEBUG=shortcuts
...
If the shortcuts debug flag is set, print out
shortcut activations.
2020-05-29 17:59:58 -04:00
Jakub Steiner
f4705bab1e
Adwaita: limit scope of :backdrop
...
- most controls don't have:backdrop state
- different :backdrop state reserved for windows, headebars and toolbars
and some buttons
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2694
2020-05-29 12:43:13 +02:00
Matthias Clasen
506d73cf32
Add gtk_im_context_filter_key
...
An event-less variant of the filtering api.
2020-05-28 17:08:33 -04:00
Matthias Clasen
2d80b105ce
shortcut controller: Fix mnemonic cycling
...
Iterate the shortcuts we found in order, not in
reverse. Otherwise, we always end up activating
the last_selected one, since it is last in the
list.
This broke in fb9b54d4b2
when a list was
turned into an array.
2020-05-28 08:52:55 -04:00
Yuri Chornoivan
01bd4cc4e1
Fix minor typos
2020-05-28 11:00:03 +03:00
Matthias Clasen
8e427b7d69
a11y: Widgets have children
...
This brings back some of what we lost when
GtkContainerAccessible went away.
2020-05-27 22:56:33 -04:00
Matthias Clasen
2c80691be6
aboutdialog: Stop overriding show()
...
This is entirely unnecessary.
2020-05-27 20:05:26 -04:00
Matthias Clasen
1cd71203b8
volumebutton: Enable the tooltips
...
Little point in having a query-tooltip handler if
we don't make sure ::query-tooltip is emitted.
2020-05-27 19:02:30 -04:00
Matthias Clasen
9c5fc0fb7a
volumebutton: Remove broken a11y code
...
The accessible of a button is not an AtkImage,
so whatever this code was trying to do isn't
working. Remove it.
2020-05-27 19:02:19 -04:00
Matthias Clasen
1927a8af71
tooltips: Fix a line wrap mishap
...
We don't want wrapping labels to cause tooltips to
have excessive height, so we need to set a reasonable
value for width-chars, without forcing short tooltips
into a full line length. Also be careful to respect
preexisting line breaks (we have such examples in
widget factory).
2020-05-27 19:01:46 -04:00
Emmanuele Bassi
637186976c
Remove spurious annotations
...
Boolean values are not nullable, and have no ownership to transfer.
2020-05-27 15:49:24 +01:00
Emmanuele Bassi
175d4ef03e
Add missing documentation for GtkOverlayLayout
...
We're missing the documentation for the constructor, and for the child
properties.
2020-05-27 15:49:24 +01:00
Carlos Garcia Campos
a2aa25d28e
build: add gtkoverlaylayout.h to the list of public headers
...
GtkOverlayLayout is now public but the header is not installed.
2020-05-27 11:13:02 +02:00
Matthias Clasen
efbc661620
window: Drop an unused field
...
The type-hint property is gone, and nothing reads
or writes the type_hint field anymore.
2020-05-26 19:30:26 -04:00
Matthias Clasen
5f9bcd0409
accelgroup: Expand translator comment
...
Add details about the use of KP.
2020-05-25 22:50:03 -04:00
Matthias Clasen
bd3f4599ed
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2778
See merge request GNOME/gtk!1966
2020-05-26 02:41:37 +00:00
Matthias Clasen
ddf6138d07
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #2783
See merge request GNOME/gtk!1962
2020-05-26 01:35:11 +00:00
Matthias Clasen
a55d179215
accelgroup: Drop some unused code
2020-05-25 20:56:09 -04:00
Matthias Clasen
0f096d6ad9
bitmask: add an assertion
...
The static analysis in ci is complaining about
this, since it doesn't know that start is always
smaller than end.
2020-05-25 20:56:09 -04:00
Matthias Clasen
9fa3742c09
Make GtkOverlayLayout public
...
Keeping the layout manager type private does not
really work when it has layout child properties
that need to be usable in ui files.
2020-05-25 14:22:10 -04:00
Timm Bäder
2127cc1943
adwaita: move backdrop box shadows to .csd
...
Fixes #2781
2020-05-25 10:36:29 +02:00
Emmanuele Bassi
7de9eb005e
Add a comment for translators
...
"KP" refers to the numeric keypad, in this context.
Fixes : #2783
2020-05-24 15:20:13 +01:00
Emmanuele Bassi
d68e312c2b
Use the private GdkKeyEvent.translated_key getter
...
We can avoid poking directly at the GdkKeyEvent structure, now.
2020-05-24 15:19:01 +01:00
Timm Bäder
60902484fd
applicationwindow: Simplify measure implementation
...
We already chain up first thing in this function, so no need to do it
again.
2020-05-24 15:59:05 +02:00
Timm Bäder
48c9c86626
window: Remove private _get_shadow_width()
...
Unused now.
2020-05-24 15:59:05 +02:00
Timm Bäder
2e27a76edd
applicationwindow: Stop querying shadow width
...
don't need to do this anymore.
2020-05-24 15:59:05 +02:00
Matthias Clasen
5e25ba6c5a
Merge branch 'no-app-menu' into 'master'
...
Drop the app menu
Closes #2731
See merge request GNOME/gtk!1951
2020-05-22 23:46:56 +00:00
Matthias Clasen
0dc384265c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1957
2020-05-22 22:19:59 +00:00
Matthias Clasen
133461581f
Merge branch 'BUG_filechooserbutton_remote_GTK4' into 'master'
...
FileChooserButton: query 'display name' also for unbookmarked files
Closes #1966
See merge request GNOME/gtk!1725
2020-05-22 21:37:40 +00:00
Matthias Clasen
79d6a77d58
gtkapplication: Drop app menu support
...
Drop apis and code related to appmenus from
both GtkApplication and GtkApplicationWindow.
We still keep the menubar support, since it
is needed for system integration on OS X.
Fixes : #2731
2020-05-22 17:31:05 -04:00
Matthias Clasen
a8df81b27c
inspector: Drop app-menu support
...
Don't add app menu to the object tree anymore;
this property is going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
33b836af7f
fixed: Change coordinate apis to doubles
...
We are using floating point for coordinates
everywhere now, so be consistent here.
This commit also changes the implementation of
gtk_fixed_get_child_position to work with
non-translation child transforms.
2020-05-22 17:26:08 -04:00
Matthias Clasen
dff5986ec2
main: Keep the target widget alive
...
We are passing the event to the tooltip handle_event
function at the very end. Unfortunately, the target_widget
may have already died at that point. We prevent that
by taking a ref during propagage_event, but the tooltip
code was outside of that. Keep a ref until the very
end ot prevent crashes.
2020-05-22 12:25:23 -04:00
Matthias Clasen
78b427c99d
dragsource: Actually use the paintable
...
We were just ignoring a paintable provided by
gtk_drag_source_set_icon().
2020-05-22 10:49:57 -04:00
Matthias Clasen
aec0a49e91
colorswatch: Remove a redundant include
2020-05-22 10:48:49 -04:00
Matthias Clasen
01df133401
text: Avoid clash of preedit and placeholder
...
Take preedit into account when determining the
visibility of placeholder text.
2020-05-22 10:48:33 -04:00
Ondrej Holy
e8a120e5af
trash-monitor: Rate limit updates
...
Trash monitor queries info from gvfsd-trash after each file monitor
change which can be problematic when too many changes happen in
a short time. Let's rate limit the number of queries...
Fixes : #1010
2020-05-21 21:15:12 -04:00
Matthias Clasen
e9872d52d8
range: Treat lower and upper limit the same
...
When clamping values to be within the range of
the adjustment, treat the lower and upper limit
the same.
Fixes : #328
2020-05-21 20:37:54 -04:00
Matthias Clasen
3b8bd265a3
windowhandle: Drop Move and Resize from the fallback menu
...
The expected behavior is that we trigger a keyboard-driven
interactive move or resize operation. But that doesn't work
with common compositors like mutter or weston, so lets not
expose non-working menuitems.
2020-05-21 19:38:36 -04:00
Matthias Clasen
af162b70c5
tooltip: Avoid criticals
...
It is possible that the target widget is already
unparented at the time that we call the tooltips
handle_event function. Quietly return in that case,
no need to emit a critical.
2020-05-21 19:38:36 -04:00
Matthias Clasen
061f257e83
accelgroup: Use Unicode in string literals
...
Its 2020, non-ASCII characters are not taboo anymore.
2020-05-21 19:38:36 -04:00
Matthias Clasen
c58d9446f4
Differentiate keypad keysyms in accelerators
...
When displaying accelerators, differentiate keypad
symbols with a 'KP' prefix. Fixing a 17 year old bug.
Update expected output in accelerator tests.
Fixes : #227
2020-05-21 19:38:19 -04:00
Matthias Clasen
c4607f72d1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1950
2020-05-20 20:57:34 +00:00
Matthias Clasen
9a1b4a766f
mediastream: Volume is a double
...
Another obvious copy-paste error in the property
declarations of GtkMediaStream. Volume should be
a double, with range [0, 1], not a boolean.
2020-05-20 16:07:50 -04:00
Matthias Clasen
87d2e86429
mediastream: Some properties were meant to be readonly
...
These properties aren't covered by set_property(), and
it doesn't make sense to do so. They were just declared
as read-write by mistake.
2020-05-20 16:07:50 -04:00
Matthias Clasen
ee2c55379c
mediacontrols: Make volume control react to has-audio
2020-05-20 16:07:50 -04:00
Alexander Mikhaylenko
2ce8c82846
window: Fix tiled style class names
...
This should fix the round corners on tiled windows.
2020-05-20 22:10:32 +05:00
Timm Bäder
22e7d11583
window: Use GtkNative's check_resize everywhere
2020-05-20 18:12:22 +02:00
Timm Bäder
9cc6ddf80d
window: Create default titlebar directly in realize
...
Instead of having two functions that are only called from one place but
look like they can be called from anywhere.
2020-05-20 18:12:22 +02:00
Timm Bäder
ee9d99cba3
update documentation for new style classes and node names
2020-05-20 18:12:22 +02:00
Timm Bäder
5c458e3061
Adwaita: style updates for new window node hierarchy
2020-05-20 18:12:20 +02:00
Timm Bäder
dfbcd475f3
window: Fix the surface coordinates everywhere
2020-05-20 17:08:24 +02:00
Timm Bäder
018efdb8eb
window: Inline gtk_window_configure() into only caller
...
And remove the prototype from gtkwindowprivate.h
2020-05-20 17:08:24 +02:00
Timm Bäder
ec594f80dc
window: Rewrite edge region detection
2020-05-20 17:08:24 +02:00
Timm Bäder
131837087b
window: Fix computing the opaque region
...
We need to look at the surface transform here as well now.
2020-05-20 17:08:21 +02:00
Timm Bäder
7eec162502
window: Avoid using GtkStyleContext in subtract_decoration_corners
...
We can do this by just using the GtkCssStyle these days.
2020-05-20 17:06:54 +02:00
Timm Bäder
8c884e94c2
window: Fix get_surface_transform()
...
Look at the shadow here.
2020-05-20 17:06:54 +02:00
Timm Bäder
7659d8af3d
window: Set overflow to HIDDEN
...
It really doesn't make sense for the general window to allow drawing
outside of it.
2020-05-20 17:06:54 +02:00
Timm Bäder
a5e7e72dd8
inspector: Fix overlay coordinates
...
Get the native transform only once, for all overlays. Unfortunately we
have to undo this for the updates overlay since that one gets values
in surface coordinates.
2020-05-20 17:06:54 +02:00
Timm Bäder
8e8e869853
inspector: Don't offset layout overlay too much
...
We already do this earlier.
2020-05-20 17:06:54 +02:00
Timm Bäder
b41838a7fd
Window: Remove extra_input_region API
...
This is unused.
2020-05-20 17:06:54 +02:00
Timm Bäder
5ebabd7cf6
Call all window subclasses "window"
...
And add style classes to differentiate them
2020-05-20 17:06:54 +02:00
Timm Bäder
e1007e6c2b
window: Remove decoration node
2020-05-20 17:06:54 +02:00
Timm Bäder
2c2092e7b8
window: Don't care about shadow in measure()
2020-05-20 17:06:54 +02:00
Timm Bäder
2579f66150
window: Don't care about shadow in size_allocate()
2020-05-20 17:06:54 +02:00
Timm Bäder
077692a8e1
window: Remove custom snapshot() implementation
2020-05-20 17:06:54 +02:00
Timm Bäder
5b77d3fde3
widget: Remove GtkWindow special case in create_render_node()
2020-05-20 17:06:54 +02:00
Matthias Clasen
ebc8b01718
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!1935
2020-05-19 22:40:57 +00:00
Carlos Garnacho
d29d59d1f9
gtksearchengine: Drop tracker 2.x search engine
...
This is being superseded by 3.x
2020-05-19 22:05:07 +02:00
Carlos Garnacho
edf6f9e108
gtksearchenginetracker3: Pre-fill GFileInfo from query
...
Provide the minimal info necessary. Improves apparent responsiveness
(since we don't visibly clear and repopulate the list) and saves doing
file stat/reads on every file in the result set.
2020-05-19 22:05:07 +02:00
Carlos Garnacho
98f376a19e
gtksearchengine: Add tracker3 search engine
...
Make this dependency optional at build time, and prefer it over
the old tracker <= 2.x implementation.
2020-05-19 22:05:07 +02:00
Carlos Garnacho
de68925f0c
gtksearchengine: Add autoptr handler for this type
...
So subclasses can just use G_DECLARE_*_TYPE.
2020-05-19 22:04:25 +02:00
Carlos Garnacho
b890e87818
gtksearchengine: Add "got_results" argument to ::finished
...
The filechooser tries to figure out whether it got results by poking
the model, but all files might go through the async GFileInfo querying
state.
Make all search engines (and the composite one) just notify about this
fact, so the file chooser can behave appropriately without waiting for
the async operations to finish.
2020-05-19 22:04:25 +02:00
Timm Bäder
db76b52744
treeview: Remove animate
parameters
...
Nothing ever reads them.
2020-05-19 08:32:33 +02:00
Timm Bäder
7235472a58
text: Assert that we have ranges before using them
...
We never hit this code path otherwise but let's make sure.
2020-05-19 08:32:33 +02:00
Timm Bäder
99871639fe
unsetvalue: Add G_GNUC_NORETURN annotation
2020-05-19 08:32:33 +02:00
Timm Bäder
b92f4177aa
builder-tool Make preview closeable
2020-05-19 08:32:33 +02:00
Timm Bäder
20b906cee8
Build print backends with common_cflags
2020-05-19 08:32:33 +02:00
Timm Bäder
43ba86b7af
tools: Pass common_cflags to executables
2020-05-19 08:32:33 +02:00
Matthias Clasen
383fa6b0b0
Merge branch 'matthiasc/for-master' into 'master'
...
colorscale: Bring back the right-click on slider
See merge request GNOME/gtk!1933
2020-05-18 16:46:12 +00:00
Matthias Clasen
f637ab57f1
colorscale: Bring back the right-click on slider
...
This was lost when we converted the color editor to actions.
2020-05-18 11:31:42 -04:00
Jakub Steiner
9be5c7b0c8
Merge branch 'theme-aligned-combo-labels' into 'master'
...
Adwaita: Align combo menu labels with the combo button label
See merge request GNOME/gtk!1928
2020-05-18 14:04:19 +00:00
nana-4
538ab75002
Adwaita: Align combo menu labels with the combo button label
...
Apply the same left and right padding to the combo menu items as the
combo button.
2020-05-18 21:52:00 +09:00
nana-4
1c99dbc70e
Adwaita: Tweak padding in checkbutton & radiobutton
...
Since we can now use border-spacing in checkbutton and radiobutton,
we don't need the margin in check and radio for spacing anymore.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2697
2020-05-18 20:29:23 +09:00
Timm Bäder
3c7ba21a6a
Add G_GNUC_NORETURN to functions that never return
2020-05-18 11:30:08 +02:00
Matthias Clasen
75d9310986
Change coordinate translation apis to take doubles
...
Change gtk_widget_translate_coordinates and
gtk_native_get_surface_transform to operate
on doubles. Update all callers.
2020-05-17 17:17:31 -04:00
Matthias Clasen
93d4253c93
native: Make gtk_native_get_surface_transform public
...
This api is needed to translate between surface
and widget coordinates.
2020-05-17 16:01:08 -04:00
Matthias Clasen
c0faf0c6b6
Merge branch 'toplevel-move-resize' into 'master'
...
Toplevel move resize
See merge request GNOME/gtk!1923
2020-05-17 19:15:46 +00:00
Benjamin Otte
b353221185
Merge branch 'wip/otte/monitors' into 'master'
...
various GDK cleanups
See merge request GNOME/gtk!1920
2020-05-17 16:57:52 +00:00
Matthias Clasen
f316fe0f58
window: Use toplevel begin_move/resize api
...
The GdkSurface api for this is going away.
2020-05-17 12:49:26 -04:00
Timm Bäder
74a1c60dd4
windowhandle: Apply surface transform before passing coords to GDK
...
Otherwise coordinates are incorrect and the window can jump around after
starting a drag.
2020-05-17 15:30:50 +02:00
Timm Bäder
a4bb81b61c
inspector: Apply toplevel transform before snapshotting overlays
2020-05-17 15:30:44 +02:00
Timm Bäder
afbc1d5b66
shortcutmanager: Fix private header include guard
2020-05-17 15:30:03 +02:00
Timm Bäder
1d9e68245a
shortcutcontroller: Don't return a shortcut stope as GdkModifierType
2020-05-17 15:30:03 +02:00
Timm Bäder
9b98641ddd
window: Use TRUE/FALSE for boolean values
2020-05-17 15:30:03 +02:00
Matthias Clasen
d70feb9165
Apply surface transform in more places
...
With these fixes, GtkSwitch now works in the presence
of surface transforms.
2020-05-17 02:23:23 -04:00
Matthias Clasen
38af49d4fd
inspector: Take surface transform into account
2020-05-17 02:10:56 -04:00
Matthias Clasen
d2913b81cb
windowhandle: Take surface transform into account
2020-05-17 02:05:32 -04:00
Matthias Clasen
c90078fd4a
widget: Fix gtk_widget_get_surface_allocation
...
As the name implies, this should be surface-relative
coordinates, so it needs to take the surface transform
into account.
2020-05-17 02:04:22 -04:00
Matthias Clasen
428e647238
textview: Fix context menu placement
...
Take the surface transform into account for
positioning the context menu.
2020-05-17 02:03:41 -04:00
Benjamin Otte
4c7914dc49
display: Remove unneeded getters
...
Applications can use the listmodel instead.
2020-05-17 07:32:37 +02:00
Matthias Clasen
5e35a4b69a
tooltip: Fix positioning
...
There are a few more places where we were forgetting
to apply the surface->native transform. With these
changes, tooltips are positioned correctly when
the toplevel has padding applied.
Fixes : #1619
2020-05-17 01:22:02 -04:00
Matthias Clasen
a2a3aab94d
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #2601
See merge request GNOME/gtk!1918
2020-05-16 23:35:51 +00:00
Benjamin Otte
0c6266fd1a
surface: Remove gdk_surface_is_viewable()
...
It returns the same value as gdk_surface_get_mapped(), so use that
instead.
2020-05-17 00:41:44 +02:00
Timm Bäder
5b0e91844b
popover: Fix input shape rendering
...
Once again, calling gtk_widget_get_allocation() is wrong.
Fixes #2601
2020-05-16 22:34:38 +02:00
Timm Bäder
ccaacfc8c3
texthandle: Remove min-width/height handling
...
We do that automatically for all widgets.
2020-05-16 22:04:00 +02:00
Timm Bäder
2e9d772e66
natives: Use GtkCssBoxes in get_surface_transform
2020-05-16 22:04:00 +02:00
Timm Bäder
bac6e79614
native: Add documenation for get_surface_transform
2020-05-16 22:03:58 +02:00
Timm Bäder
2fd86ef80c
popover: Return correct values from get_surface_transform()
...
We do not (yet) care about the box shadow here, so it's sufficient to
return the css values.
2020-05-16 22:03:58 +02:00
Timm Bäder
f9370d7e83
main: Translate coordinates from surface to native before picking
...
gtk_widget_pick() needs them to be in @self coordinates.
2020-05-16 22:03:55 +02:00
Matthias Clasen
c5b2bbf01b
inspector: Use tabular numbers in the fps overlay
...
It is a lot more readable if it doesn't constantly jitter.
2020-05-15 21:30:14 -04:00
Matthias Clasen
8912a6eb75
gtk: Handle seatless displays
...
If you run weston with the headless backend, you get a Wayland
display with no seat, which is just fine by the protocol.
gdk_display_get_default_seat() returns NULL in this case. Various
widgets assume that we always have a seat with a keyboard and a
pointer, since that is what X guarantees. Make things survive
without that, so we can run the testsuite under a headless
Wayland compositor.
2020-05-15 14:11:53 -04:00
Corentin Noël
80473ccd69
widget: Add array annotation to set_css_classes
...
It expects a NULL-terminated array so annotate it.
2020-05-15 12:01:56 +02:00
Jakub Steiner
d7e6fbf8a2
Adwaita: notebook tab focus tweak
...
Finally fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
2020-05-15 09:34:57 +02:00
Alexander Mikhaylenko
5dc6194b98
eventcontrollerscroll: Fix the history push condition
...
Once upon a time, there was a function called gdk_event_get_scroll_deltas().
It returned %TRUE when an event had scroll deltas and that was used as the
condition to decide whether to push scroll deltas to the scroll history,
even when the both deltas are 0 for the stop event at the end of scrolling.
When GtkScrolledWindow kinetic scrolling code was adapted for
GtkEventControllerScroll, it was replaced with a (dx != 0 && dy != 0)
check. This prevented the stop event from getting into the history, and
instead allowed non-smooth scrolling to affect the history as they have
synthetic deltas with one of the values being -1 or 1 and the other on 0.
Instead, check the direction as we already have it as a local variable.
2020-05-15 01:32:04 +05:00
Jakub Steiner
dd61c248c1
Adwaita: don't focus outline tabs with mouse
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
2020-05-14 18:50:47 +02:00
Alexander Larsson
4ce65f019e
GtkDragSource: Pass return value of drag-cancel into drag_end()
...
This is needed to work as the docs say (don't play fallback cancel animation
if cancel returned TRUE to signal the drop already happened).
2020-05-14 10:44:07 +02:00
Matthias Clasen
69ab403d78
flowbox: Avoid an assertion in snapshot()
...
The api contract for size_allocate() vfuncs is
that they must allocate all the children that are
going to be snapshotted in snapshot(). The flowbox
size_allocate() was just bailing out when the children
request a size of 0x0, leading to an assertion in
snapshot() vfunc later. Just allocate all children
a size of 0x0 in this case.
2020-05-13 21:47:11 -04:00
Matthias Clasen
33011ccdff
flowbox: Avoid a crash in measure()
...
When the children request a height of zero, the
flowbox measure() function was happily dividing
by that zero, leading to badness.
2020-05-13 21:47:11 -04:00
Matthias Clasen
7915e998e2
listbox: Make Shift-Tab work again
...
The previous fix broke the case where we're Shift-Tabbing
from a listboxrow child to the row itself. This was causing
the widget-factory2.tab-backward test to fail. Fix it, by
grabbing the focus to the row explicitly.
2020-05-13 21:45:49 -04:00
Matthias Clasen
7ef51da1c1
listbox: Don't steal focus-on-click
...
If a row has content that is focus-on-click, and is set
to focus-on-click itself, then the row steals the focus
fromt he content, since it uses focus-on-click on button
release, as opposed to button press. Avoid that by
refusing to take focus if it is already on some
descendent of the row.
This was showing up in the widget-factory listbox on
page 2, where clicking on the spinbutton would briefly
put the focus on the spinbutton, only to lose it to
the row.
2020-05-13 19:43:04 -04:00
Matthias Clasen
4c8688b846
inspector: Disable recursive inspection
...
We can't inspect the inspector, it doesn't work.
Therefore, disable the keybindings in the
inspector window.
2020-05-13 18:56:25 -04:00
Matthias Clasen
cea66139ae
flowbox: Make the children focusable again
...
This broke when the :focusable property was introduced.
The symptom was that keynav in the Emoji chooser did
not work anymore.
2020-05-13 18:27:18 -04:00
Matthias Clasen
10be40a8b1
scrolledwindow: Fix swapping out child
...
This was not working in the case that the existing child
is not a scrollable. It showed up as crashes of the
scrolling benchmark in gtk4-demo when switching examples.
2020-05-13 17:10:36 -04:00
Matthias Clasen
d1134e7616
Merge branch 'usable-scales' into 'master'
...
Usable scales
See merge request GNOME/gtk!1893
2020-05-13 20:06:51 +00:00
Matthias Clasen
aae0770b82
scale: Make the area around the trough clickable
...
The narrow trough is too hard to hit as a click target.
Make the entire scale clickable.
2020-05-13 15:27:35 -04:00