Commit Graph

57593 Commits

Author SHA1 Message Date
Matthias Clasen
bea8025fb5 Drop the GtkWidget::display-changed signal
Display changes now happen exclusively through
the ::root and ::unroot vfuncs. Third parties
can observe display changes by listening
for notify::root.
2019-05-02 01:33:41 +00:00
Matthias Clasen
965d0e04d1 gtk: Use root/unroot instead of display-changed
The display-changed signal is going away
2019-05-02 01:33:41 +00:00
Matthias Clasen
d7c54920ee menu: Listen only for notify::root
We no longer emit the display-changed signal,
so stop listening.
2019-05-01 23:05:09 +00:00
Matthias Clasen
33a8108f19 window: Implement display change via root/unroot
Export gtk_widget_root/unroot privately,
make them work on roots, and use them in
gtk_window_set_display. This gets us to a
single way to listen for display changes,
the root property.
2019-05-01 23:05:09 +00:00
Matthias Clasen
78d254370c Merge branch 'inspector-menu-fix' into 'master'
Inspector menu fix

See merge request GNOME/gtk!804
2019-05-01 23:01:50 +00:00
Matthias Clasen
377ec33069 menus: Fix menus on non-default displays
Currently, we sometimes emit display-changed
when the display changed, and sometimes we don't
since the display is changed via gtk_widget_root.

Listen for notify::root as well and update our
display. This is a temporary fix - all display
changes should go through gtk_widget_root,
eventually.
2019-05-01 22:50:29 +00:00
Benjamin Otte
2952ba07e1 Merge branch 'kill-menu-display' into 'master'
Kill menu display

See merge request GNOME/gtk!806
2019-05-01 22:09:13 +00:00
Matthias Clasen
62b7ea7611 Remove gtk_menu_set_display
Menus should always be attached to a toplevel,
in which case they get their display that way.
2019-05-01 21:54:57 +00:00
Matthias Clasen
c9eca55c5e tests: Stop using gtk_menu_set_display
It is not needed here.
2019-05-01 21:54:57 +00:00
Matthias Clasen
435bc269e9 Merge branch 'expander-demo-fix' into 'master'
gtk-demo: Make the expander demo behave again

See merge request GNOME/gtk!805
2019-05-01 21:19:27 +00:00
Matthias Clasen
0d2a7f876b gtk-demo: Make the expander demo behave again
Changes to the dialog hierarchy have affected
this demo, that admittedly pokes at message
dialog internals. Do that some more, to fix
things up.
2019-05-01 21:12:36 +00:00
Matthias Clasen
737400ddbc wayland: sanity check events at the source
Sanity check events before we throw them into
the event queue, as this makes it much easier
to track down the culprit.
2019-05-01 20:51:43 +00:00
Matthias Clasen
134e159bc9 gdk: add a sanity check for events
Before delivering events to GTK, make sure
they're sane. For now, this means making sure
the surface and device are from the same
display.
2019-05-01 20:50:24 +00:00
Matthias Clasen
6f0b47681b seat: Add a sanity check
apis that takes multiple display-relative objects
should make sure that they are all from the same
display, or hard-to-track-down badness will happen
later on.

Add such a check for the surface and device arguments
of gdk_seat_grab. This helped in tracking down
critical warnings from combo boxes in the inspector.
2019-05-01 20:46:02 +00:00
Matthias Clasen
d53981fdbb Merge branch 'add-color-button-fix' into 'master'
Adwaita: Fix 'add color' button corners

Closes #1856

See merge request GNOME/gtk!801
2019-05-01 17:26:34 +00:00
Matthias Clasen
e09beee62a Adwaita: Fix 'add color' button corners
The specification for border-radius goes
top-left top-right bottom-right bottom-left.
The css for the add button in the color
chooser got this wrong, and was showing
a broken top-right corner.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1856
2019-05-01 17:18:39 +00:00
Rico Tzschichholz
724ec3ca92 Add a few placeholder documentation block to have g-i annotations 2019-05-01 15:03:16 +02:00
Matthias Clasen
3ce6a710a3 Merge branch 'entry-fix' into 'master'
Fix Emoji insertion

See merge request GNOME/gtk!800
2019-05-01 05:21:09 +00:00
Matthias Clasen
e41596d6a1 text: Make Emoji insertion work properly
We are now getting focus-out and focus-in events
when the Emoji chooser is shown and hidden, and
this is causing the text to select-on-entry before
inserting the Emoji, which then deletes the selection.

Avoid this by saving and restoring the selection
when presenting the Emoji chooser.
2019-05-01 05:13:52 +00:00
Matthias Clasen
0fa4d54316 inspector: Track readonly property values
That a property can't be set does not mean
its value can't change. This was showing up
as the cursor-position and selection-bound
properties in GtkText not showing their
current value in the inspector.
2019-05-01 04:57:54 +00:00
Matthias Clasen
e7cbb7a76c inspector: Don't listen for notify twice
The property list now uses property editors
for the value, which listen for updates by
themselves, so no need for the list to do it.
2019-05-01 04:44:07 +00:00
Matthias Clasen
b2a23a9a90 entry: only notify properties we have
GtkText now has the propagate-text-width property,
which is not present on GtkEntry, so we can't just
blindly forward all properties.
2019-05-01 04:41:28 +00:00
Matthias Clasen
6878c2bae0 Merge branch 'minus-one' into 'master'
fix signedness issues in api

Closes #1555

See merge request GNOME/gtk!799
2019-05-01 03:38:42 +00:00
Matthias Clasen
5b8f1aa2ee Merge branch 'xdg-output' into 'master'
[gtk4] wayland: Add support for xdg-output

Closes #1828

See merge request GNOME/gtk!751
2019-05-01 03:34:56 +00:00
Matthias Clasen
6b4a82224c Merge branch 'window-activate-revert-master' into 'master'
Revert "gdk: deactivate/activate surface on keyboard grabs"

See merge request GNOME/gtk!795
2019-05-01 03:32:12 +00:00
Matthias Clasen
1f30b7742b textutil: Fix signedness issues in api
A length argument that can be -1 should be signed.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
2019-05-01 03:25:29 +00:00
Matthias Clasen
54e7a94d70 builder: Fix signedness issues in apis
Whenever we take a length argument that can
be -1 for 'nul-terminated', it should be
gssize, not gsize.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
2019-05-01 03:21:29 +00:00
Matthias Clasen
f1919c706f Merge branch 'grab-cursor-fix' into 'master'
window: Prevent resize cursors from sticking

Closes #23

See merge request GNOME/gtk!797
2019-05-01 00:42:09 +00:00
Matthias Clasen
26b17473aa window: Prevent resize cursors from sticking
When a modal dialog is smaller than its parent,
we were keeping the resize cursor from the dialogs
edge all over the parent window, which looks
really irritating, since the resize cursors are
closely associated with the window edge. Fix
this by falling back to the default cursor
outside the grab widgets surface.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/23
2019-04-30 20:19:35 -04:00
Samuel Thibault
99eee5cea9 Revert "gdk: deactivate/activate surface on keyboard grabs"
This reverts commits 35417a5a74 and
01455399e8.

This reintroduces #85, but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.
2019-04-30 16:48:16 +02:00
Timm Bäder
074a0014c1 filechooserwidget: Only query clock-format setting once
We don't support that setting life-updating anyway. So, instead of
getting the value *every time we format a time*, get it once for the
filechooserwidget and reuse that value.
2019-04-30 06:43:42 +02:00
Timm Bäder
091cac00b2 Adwaita: Fix active spinbutton button image color
The spinbutton>button>image is currently blue when the image is clicked
and dark-ish when the button is clicked(but not the image). This was not
the case before since we didn't even propagate :active down to the image
child. Fix this by only applying the blue color to direct image children
of entries.
2019-04-30 05:54:00 +02:00
Timm Bäder
175e3d751d filechooserwidget: Remove unnecessary deprecation guards 2019-04-30 05:36:20 +02:00
Timm Bäder
83e9361005 filechooserwidget: Stop using gtk_widget_get_allocat* 2019-04-30 05:36:20 +02:00
Timm Bäder
17bb1248b5 filechooserwidget: Shorten cancel_all_operations() impl 2019-04-30 05:36:20 +02:00
Timm Bäder
8211e79be9 filechooserwidget: Shorten dispose impl a bit 2019-04-30 05:36:20 +02:00
Timm Bäder
d5282862e5 filechooserwidget: Remove some unnecessary show() calls
Widgets are visible by default now.
2019-04-30 05:36:20 +02:00
Timm Bäder
26b6d18563 filechooserwidget: Use a bin layout
Instead of implementing size_allocate and measure manually.
2019-04-30 05:36:20 +02:00
Timm Bäder
31fb5cc2d4 filechooserwidget: Shorten finalize implementation a bit 2019-04-30 05:36:20 +02:00
Timm Bäder
90301c6813 filechooserwidget: Inline fuction into only caller 2019-04-30 05:36:20 +02:00
Timm Bäder
ccdf50aafd filechooserwidget: Fix rename popover widget alignment 2019-04-30 05:36:20 +02:00
Timm Bäder
af5c80248d placesview: Bring spacing in the actionbar back
In particular between the Connect button and the adjacent button/entry
combination.
2019-04-30 05:36:20 +02:00
Timm Bäder
1d81a58cf1 filechooserwidget: Pick reasonable default sidebar width
The old default of 148px doesn't work everywhere. Instead, pick a
default value of -1 and measure() the sidebar widget in the
filechooserwidget in that case. Other values >= 0 are still handled as
before.
2019-04-30 05:36:20 +02:00
Timm Bäder
09cec2e6a1 filechooserwidget: Delay view switch to search hits
Leave it to the ::hits-added handler to switch to the list of search
hits. This way we don't get a weird transition when the current search
didn't have any hits and the next one doesn't either.
Searches with hits still feel good.
2019-04-30 05:36:20 +02:00
Chun-wei Fan
efed2641f4 Merge branch 'fix-win32-gl-resize' into 'master'
Fix win32 gl resize

See merge request GNOME/gtk!694
2019-04-30 03:35:16 +00:00
Matthias Clasen
97a5ca74d2 Merge branch 'modelbutton-focus' into 'master'
Adwaita: Give model buttons visible focus

See merge request GNOME/gtk!794
2019-04-29 19:32:31 +00:00
Matthias Clasen
5b5b215dea Merge branch 'frameclock-property' into 'master'
surface: Add a frame-clock property

See merge request GNOME/gtk!791
2019-04-29 19:23:09 +00:00
Matthias Clasen
7a06859f38 Adwaita: Give model buttons visible focus
Hard to use keynav, otherwise.  Also, hard
to debug focus issues if you can't see where
the focus is.
2019-04-29 15:21:40 -04:00
Matthias Clasen
24fa104b61 surface: Add a frame-clock property
Now that GdkSurface has properties, it makes
sense to turn the frame clock into one too.

This will make it easier to reshuffle some
of the surface constructors later.
2019-04-29 15:11:58 -04:00
Matthias Clasen
89861faa04 Merge branch 'tooltip-cleanup' into 'master'
tooltip: Remove an unused gdk_surface_get_root_coords call

See merge request GNOME/gtk!793
2019-04-29 19:04:49 +00:00