Commit Graph

56851 Commits

Author SHA1 Message Date
Emmanuele Bassi
1b8595b5f2 Hook GtkLayoutManager into GtkWidget
We delegate the size request mode, the measuring, and the allocation of
a widget through a GtkLayoutManager instance, if one has been attached
to the widget; otherwise, we fall back to the widget's own implementation.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
24754c3259 Add GtkLayoutManager
A base abstract class for layout manager delegate objects.

Layout managers are associated to a single widget, like event
controllers, and are responsible for measuring and allocating the
children of the widget they are bound to.
2019-03-26 00:11:27 +00:00
Matthias Clasen
4dfe2a8aa8 Fix the windows build
There was another warp implementation that needed to be removed.
This commit also addresses a number of compiler warnings
in passing.
2019-03-25 20:06:08 -04:00
Timm Bäder
ab7507150b Doc comment fixup 2019-03-25 15:57:31 +01:00
Timm Bäder
e657d9d553 popover: Always measure contents gizmo
Otherwise we're getting warnings about allocating a widget we haven't
measured first, which is fair. The contents gizmo itself will later take
care about whether or not the real popover child is NULL.
2019-03-25 15:57:31 +01:00
Timm Bäder
36e00ae95e popover: Don't try to compute_bounds of a NULL child 2019-03-25 15:57:30 +01:00
Matthias Clasen
f2dff5115f win32: Drop the warp implementation
We no longer support pointer warping.
2019-03-25 10:16:14 -04:00
Piotr Drąg
a246f8c22a Update Polish translation 2019-03-25 14:37:44 +01:00
Piotr Drąg
6efa1fc006 Update POTFILES.in 2019-03-25 14:19:54 +01:00
Matthias Clasen
3d37f08f38 Remove gdk_device_warp
This was only ever implemented on X11, and is
not something we want to encourage apps to do, ever.
2019-03-24 20:49:08 -04:00
Matthias Clasen
160f1e581a Remove a dead file
We are not using this anymore.
2019-03-24 20:48:35 -04:00
Matthias Clasen
661e195ffc color editor: Don't warn if editing is cancelled
Thats a valid way to end color picking.
2019-03-24 20:47:26 -04:00
Benjamin Otte
551ced9ae4 Fix compile warning 2019-03-23 03:08:20 +01:00
Benjamin Otte
799cb39e08 Remove win32 themeing support
It was unused through all of GTK 3, so it is not worth supporting.

The best Windows themes do not make use of it at all.
2019-03-22 22:30:01 +01:00
LRN
0615668dd9 Merge branch 'ime-load-fix' into 'master'
Ime load fix (GTK4)

See merge request GNOME/gtk!662
2019-03-22 21:10:35 +00:00
Matthias Clasen
1ada7bbc02 Fix hover state handling
We were not paying enough attention to detail when updating
hover and focus state while generating crossing events. The
invariant that we need to preserve here is that when a widget
has focus or hover, its parent does too.
2019-03-22 16:35:20 -04:00
Matthias Clasen
81658105f7 Stop walking parent surfaces for crossing event generation
We basically don't have child surfaces anymore (the last
use in popovers is on the way out). This really needs
to be done in terms of widgets, not surfaces. For now,
just stop walking parent surfaces.
2019-03-22 16:35:20 -04:00
Benjamin Otte
d9ef734458 cssparser: Simplify
Remove the uint parser (and use the int parser in the one user of it).

And avoid unnecessarily going through a macro.
2019-03-22 19:55:34 +01:00
Benjamin Otte
73760e5835 cssparser: Remove unused functions 2019-03-22 19:55:34 +01:00
Matthias Clasen
5638882dca Remove debug spew 2019-03-22 14:44:51 -04:00
Руслан Ижбулатов
8da56cef79 GDK W32: Fix property setting to correctly use static strings
The strings that are set are static, so g_value_set_static_string() should
be used to set them instead of g_value_set_string().
2019-03-22 16:59:03 +00:00
Руслан Ижбулатов
64ab82c403 GDK W32: Test for IME correctly
ImmIsIME() doesn't work (always returns TRUE) since Vista.
Use ITfActiveLanguageProfileNotifySink to detect TSF changes,
which are equal to IME changes for us.

Also make sure that IMMultiContext re-loads the IM when keyboard layout
changes, otherwise there's a subtle bug that could happen:
* Run GTK application with non-IME layout (US, for example)
* Focus on an editable widget (GtkEntry, for example)
* IM Context is initialized to use the simple IM
* Switch to an IME layout (such as Korean)
* Start typing
* Since IME module is not loaded yet, keypresses are handled
  by a default MS IME handler
* Once IME commits a character, GDK will get a WM_KEYDOWN,
  which will trigger a GdkKeyEvent, which will be handled by
  an event filter in IM Context, which will finally re-evaluate
  its status and load IME, and only after that GTK will get
  to handle IME by itself - but by that point input would
  already be broken.
To avoid this we can emit a dummy event (with Void keyval),
which will cause IM Context to load the appropriate module
immediately.
2019-03-22 16:58:59 +00:00
Matthias Clasen
56df49971a entry: Disconnect text signals in dispose
This was showing up as crashes when closing
the file chooser.
2019-03-21 19:15:55 -04:00
Matthias Clasen
0bf136a902 Merge branch 'adwaita-remove-selectionmode-assets-master' into 'master'
Adwaita: Drop checkbox-selectionmode assets

See merge request GNOME/gtk!634
2019-03-20 14:10:18 +00:00
Matthias Clasen
2479d60012 Merge branch 'adwaita-selectionmode-checkboxes-master' into 'master'
Adwaita: Fix selection-mode checkboxes

Closes #28

See merge request GNOME/gtk!629
2019-03-20 14:10:05 +00:00
Matthias Clasen
6990f73940 Merge branch 'adwaita-headerbar-switch-margins-master' into 'master'
Adwaita: Adjust switch margins on headerbars

Closes #1759

See merge request GNOME/gtk!651
2019-03-20 14:06:19 +00:00
Matthias Clasen
254c27acbe Merge branch 'wip/jimmac/focus-ring-radii' into 'master'
Adwaita: draw bigger radius for focus rings

Closes #1756

See merge request GNOME/gtk!649
2019-03-20 12:32:15 +00:00
Matthias Clasen
558405e1bc window: Update state flags
When the window gets active / inactive, we
don't propagate events, but just send focus-in / -out
to the current focus_widget. Improve this by updating
its state flags as well.
2019-03-19 21:33:38 -04:00
Matthias Clasen
f47c376fb1 main: Fix crossing event generation for parented roots
We were walking the parent chain here, which now
always needs to consider whether it should stop
at roots. Like this one should.

The symptom was that a label with a popup attached to
it would end up with an unintentional focus ring that
would not go away.
2019-03-19 21:33:38 -04:00
Alex Monday
5679b9a687 Adwaita: Adjust switch margins on headerbars
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1759
2019-03-19 19:59:05 +05:00
Jakub Steiner
24235f61ab Adwaita: draw bigger radius for focus rings
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1756
2019-03-19 14:07:10 +01:00
Benjamin Otte
a44ac75e65 gtk: Don't include gtkstylecontext.h from gtkcsstypesprivate.h
And make sure it's included everywhere it's needed.
2019-03-19 08:53:25 +01:00
Benjamin Otte
85c8e29d78 stylecontext: Move atk.h include where it belongs 2019-03-19 08:49:15 +01:00
Benjamin Otte
8fb797866d paned: hide the handle widget when <2 children are visible 2019-03-19 08:48:50 +01:00
Benjamin Otte
96a677e5ca paned: Refactor
Don't call a useless function, call gtk_widget_set_child_visible()
directly.
2019-03-19 08:48:41 +01:00
Benjamin Otte
07054ca20d singleselection: Add forgotten notify emission
Also, add docs for the model property while I'm looking at the file.
2019-03-19 08:48:22 +01:00
Benjamin Otte
8f6a48832d revealer: Always use identity transform for revealed child
Refactor the child allocation machinery, so that the complex allocation
paths are only run when the animation is running.

And in particular, ensure that when no animation is running, the
identity transform is allocated.
2019-03-19 08:48:06 +01:00
Benjamin Otte
658588dfe7 renderer: Make gsk_renderer_is_realized() public
... and add a property for it.
2019-03-19 08:47:54 +01:00
Benjamin Otte
480d8aec06 renderer: Remove display property
Renderers don't need a display until they get realized. And once they
get realized, they can look up the display from the surface.
2019-03-19 08:47:54 +01:00
Matthias Clasen
0d91481587 One forgotten leave signal handler 2019-03-18 15:35:07 -04:00
Matthias Clasen
8650980797 Adapt to motion controller api change
The signature of the enter/leave signals changed.
Adapt all users.
2019-03-18 09:24:42 -04:00
Matthias Clasen
2b0d1bca43 motion controller: Install the properties
Oops
2019-03-18 08:44:35 -04:00
Matthias Clasen
f7e328e5f7 Merge branch 'paned-no-grab' into 'master'
paned: Don't use a grab

See merge request GNOME/gtk!644
2019-03-18 11:50:42 +00:00
Matthias Clasen
b40743121b Merge branch 'crossing-details' into 'master'
motion controller: add details to signals

See merge request GNOME/gtk!621
2019-03-18 01:49:45 +00:00
Matthias Clasen
93c1353c69 Merge branch 'wip/carlosg/include-constructors-header' into 'master'
gdk: Include copy of glib/gconstructor.h

See merge request GNOME/gtk!642
2019-03-18 01:10:06 +00:00
Matthias Clasen
1196380f28 paned: Don't use a grab
It does not seem necessary for proper functioning
of the drag handle.
2019-03-17 18:55:00 -04:00
Matthias Clasen
26f99bf20c editable: Fix a thinko
When dealing with subclasses of GtkEntry, we were not
getting the property offset that is stored on the GtkEntry
type.

This was showing up as criticals when trying to set
::width-chars on a GtkFileChooserEntry.
2019-03-17 18:46:18 -04:00
Carlos Garnacho
65d9b7ee86 gdk: Include copy of glib/gconstructor.h
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
2019-03-17 21:29:59 +01:00
Piotr Drąg
688f0997f4 Update POTFILES.in 2019-03-17 17:17:02 +01:00
Matthias Clasen
430ea05aea widget: Fix a mission annotation 2019-03-17 01:11:22 -04:00