Matthias Clasen
b804235aea
Add a flags argument to gtk_widget_pick
...
This will be used to let the inspector and other users
pick insensitive widgets again. For now, update all
callers to pass no flags, preserving the current
behavior.
2019-04-07 17:19:09 +00:00
Matthias Clasen
5e24454764
window: Stop implementing pick
...
Treat popovers as a special-case for now.
2019-04-07 16:11:20 +00:00
Matthias Clasen
5c31c721af
Rename all settings schemas to avoid conflict
...
Rename all our settings schemas to the org.gtk.gtk4
prefix to avoid conflicting with the gtk3 schemas.
2019-04-02 19:27:34 +00:00
Matthias Clasen
e2fcca4e60
Rename debug settings to org.gtk.Settings.Debug4
...
This gives us the freedom to make changes without
interfering with GTK3.
2019-04-02 00:27:32 +00:00
Matthias Clasen
2f358469af
Remove GtkWindow::role
...
...and the setter/getter for it.
This is a very old X session management thing, and you
will be hard-pressed to find a session manager that can
make use of it, and even harder-pressed to find apps
using it to their advantage.
2019-03-27 17:29:17 -04:00
Matthias Clasen
03eb455c93
Rename gdk_device_get_position_double
...
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
7e4707642a
gtk: Stop using gdk_device_get_position
...
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
eb4e7b9172
Remove GtkWindow::gravity
...
This was used to interpret the position passed
to gtk_window_move. Since that is gone, gravity
is no longer useful.
2019-03-26 17:55:29 -04:00
Matthias Clasen
0481f123ea
Drop gtk_window_move and gtk_window_get_position
...
These functions operate with global coordinates,
which are not available on Wayland.
2019-03-26 17:55:29 -04:00
Matthias Clasen
d45996c728
Avoid root coordinates in begin_drag/move apis
...
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.
Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
2019-03-26 15:57:11 -04: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
6ddb61119a
Use root in gdk_synthesize_crossing_events
2019-03-16 21:30:48 -04:00
Matthias Clasen
888b92674f
Move maintaining the focus chain
...
Put this code in the same place where we generate
the crossing events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
4238a04c7b
window: Use gtk_synthesize_crossing_events
...
Emit focus change events in the same way as crossing events.
Also change the code to only emit focus change events for
the master keyboard - we only maintain a single focus location,
so sending multiple focus change events for different devices
seems confusing.
2019-03-16 21:24:45 -04:00
Matthias Clasen
7ca24f12d7
window: Remove initial-focus builder support
...
With focus-widget now a property, this is no longer needed.
2019-03-16 21:24:45 -04:00
Matthias Clasen
f68855341e
window: Remove ::set-focus
...
The focus-widget is now a property, so we don't need
this signal anymore.
2019-03-16 21:24:45 -04:00
Matthias Clasen
7819a5aab9
Drop gtk_widget_send_focus_change
...
Replace this with gtk_widget_set_has_focus + gtk_widget_event.
2019-03-16 21:24:44 -04:00
Matthias Clasen
029ec38e63
Move a check to gtk_window_set_focus
...
gtk_widget_grab_focus is just a wrapper for
gtk_window_set_focus. We should do all the enforcement
there.
2019-03-16 21:24:44 -04:00
Matthias Clasen
bd44831987
window: Implement the root focus api
...
This just uses the existing get/set_focus functions.
We keep them public for now.
2019-03-16 21:24:44 -04:00
Matthias Clasen
92f1bdcf45
Redo focus handling
...
GtkWindow has a focus_widget that points to the current input focus.
GtkWidget has a focus_child that points to the child that contains
the input focus. Following the focus_child chain from the toplevel
always leads to the focus_widget. We never unset focus_child, we only
set it. We bubble focus change events.
2019-03-16 21:24:44 -04:00
Benjamin Otte
78d013f8d3
window: Return no item for no item name
2019-02-27 08:53:33 +01:00
Matthias Clasen
b4ae491b45
window: Undo the deprection of gtk_window_present
...
After considerable discussion, we came to the conclusion
that the convenience of this API wins over the correctness
of gtk_window_present_with_time(), in particular since we
don't have a good mechanism to carry timestamps from the
events to the places where we present windows.
2019-02-26 14:11:16 -05:00
Bastien Nocera
14890fad47
window: Warn when gtk_window_present_with_time() is passed 0
...
When 0 or GDK_CURRENT_TIME is passed to gtk_window_present_with_time(),
print a warning so that the application developer knows that this isn't
a supported use of the function, but carry on working for now.
2019-02-25 17:38:08 +01:00
Bastien Nocera
5a6a7b50af
all: Don't warn about deprecated gtk_window_present usage
...
Avoid compilation warnings about internal users of gtk_window_present().
2019-02-25 17:38:08 +01:00
Bastien Nocera
8438880906
window: Deprecate gtk_window_present()
...
And expect gtk_window_present_with_time() to be used instead.
2019-02-25 17:38:08 +01:00
Matthias Clasen
a3901f2563
Drop the anchored field
...
We can just change priv->root instead.
2019-02-23 09:43:57 -05:00
Piotr Drąg
ffee2d4567
window: Rename GTK+ Inspector in user-visible strings
2019-02-21 17:49:44 +01:00
Benjamin Otte
285aba6ece
widget: Make width, height and transform be widget-relative
...
Previously, those numbers stored the values relative to the margin box
of the widget. Now they store values relative to the content box,
thereby getting rid of the last remains of weird coordinate systems.
2019-02-15 06:53:22 +01:00
Benjamin Otte
86978d2654
widget: Store the render node in the widget's coordinate system
...
Also require gtk_widget_snapshot() to be in the widget's coordinate
system.
2019-02-15 06:53:17 +01:00
Benjamin Otte
694d7c378b
root: Move the renderer to the root
2019-02-15 06:53:17 +01:00
Benjamin Otte
446713fb8b
root: Add gtk_root_get_surface_transform()
...
The function isn't used yet, so this is just infrastructure.
2019-02-15 06:53:17 +01:00
Benjamin Otte
2fbdd8b849
root: Add GtkRoot:get_display vfunc
...
And use it.
2019-02-15 06:53:17 +01:00
Benjamin Otte
aeda099f47
widget: Remove toplevel flag
...
Instead, rely on GTK_IS_ROOT().
Also implement GtkRoot on GtkWindow and GtkInvisible, the two widgets
that used to set the toplevel flag before.
2019-02-15 06:53:17 +01:00
Benjamin Otte
e0ec5caaf8
container: Drop gtk_container_check_resize()
...
Instead, hardcode GtkWindow for now.
The code for non-windows was entirely broken.
2019-02-15 06:53:17 +01:00
Benjamin Otte
2ba928e142
window: Properly detect if size allocation is needed
...
Instead of looking at the allocation, just look at the alloc_needed
widget flag that tracks if an allocation is needed.
2019-02-15 06:46:04 +01:00
Timm Bäder
14feafe3a9
window: Remove GList link directly
...
Instead of walking the list again and looking for the GList pointer we
already have.
2019-02-10 10:31:27 +01:00
Timm Bäder
057144cfdd
window: Inline function into only caller
2019-02-05 08:11:43 -05:00
Timm Bäder
9b91041025
window: Remove remaining icon_list handling
2019-02-05 08:11:43 -05:00
Timm Bäder
b215384064
window: Remove default_icon_serial
...
Now unused.
2019-02-05 08:11:43 -05:00
Timm Bäder
e6c5b9348d
window: Remove default icon list
2019-02-05 08:11:43 -05:00
Timm Bäder
55b99e9916
window: Remove icon list
2019-02-05 08:11:43 -05:00
Timm Bäder
e82d97f069
window: Remove set_default_icon
2019-02-05 08:11:43 -05:00
Timm Bäder
490bb4c2ea
window: Remove icon property
2019-02-05 08:11:43 -05:00
Timm Bäder
79664567c4
window: Remove _set_default_icon_from_file
2019-02-05 08:11:43 -05:00
Timm Bäder
7abcd5ba3b
window: Remove set_icon_from_file
...
Not all backends support setting window icons from raw pixel data, so
remove the public API in GtkWindow for it.
2019-02-05 08:11:43 -05:00
Emmanuele Bassi
25fd230327
gtk: Drop the "plus"
...
Source names should use "[gtk]" without the plus.
2019-02-05 11:26:20 +01:00
Timm Bäder
374e93ef96
window: Directly find the cursor in the widget hierarchy
...
Instead of recording the way up from the target widget to the grab
widget (or toplevel) and then walking that path upwards, just walk the
parent chain and look at the cursor.
2019-01-16 19:01:40 +01:00
Timm Bäder
c1c764255f
window: Don't manually queue a draw on the new focus widget
...
This is either unneeded and OK to remove, or it is needed and there's a
bug somewhere else.
2019-01-16 19:01:38 +01:00
Carlos Garnacho
b52dea7a10
Merge branch 'fix-corner-resize' into 'master'
...
Fix resize corners
See merge request GNOME/gtk!481
2019-01-07 18:14:33 +00:00
Timm Bäder
66d3aa8101
window: Fix state_flags_changed impl name
...
This is unrelated to GdkSurface and was changed by accident.
2019-01-03 08:56:34 +01:00