Alexander Mikhaylenko
7c3b30036e
headerbar: Show title buttons by default
...
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
2020-07-02 23:51:16 +05:00
Carlos Garnacho
8e549d73a0
gtkwidget: Drop _gtk_widget_[gs]et_shadowed()
...
This API is meaningless now, with grab-notify being handled internally.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
ddb3a4be3e
gtkmain: Make grab-notify notifications more targeted
...
We only want to send grab-notify to widgets that might have been
interacting with devices via events. Instead of going through all
widgets in all toplevels, we have the window/pointer focus information,
so we can just traverse the widget stacks for every involved foci.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
f401b05e7b
gtkwidget: Avoid poking surfaces and events in gtk_widget_list_devices()
...
This got stuck in ancient times when widgets were windowed, so the devices
in a window to know the devices in that widget would pan out. We do only
want here the devices that are inside the widget, not spread over the
surface, so rewrite this helper function to poke the toplevel foci, and
look they are contained inside the widget.
2020-06-24 11:14:52 +02:00
Timm Bäder
b2875d7b19
window: Add automatic titlebar before content widget
...
Just like we do with explicitly set titlebars
2020-06-19 05:26:24 +02:00
Timm Bäder
ddacf8cc43
window: Don't add class to css node directly
...
Use gtk_widget_add_css_class instead
2020-06-19 05:26:24 +02:00
Timm Bäder
395d13d5f1
window: Stop adding css nodes manually
...
No decoration node, no need to do this.
2020-06-19 05:26:24 +02:00
Timm Bäder
1e6e522a93
window: Remove dead code
...
There is no decoration node anymore.
2020-06-19 05:26:24 +02:00
Matthias Clasen
37633985bd
Drop gtknativeprivate.h
...
No need to ship empty headers.
2020-06-07 08:52:45 -04:00
Yuri Chornoivan
01bd4cc4e1
Fix minor typos
2020-05-28 11:00:03 +03: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
Timm Bäder
48c9c86626
window: Remove private _get_shadow_width()
...
Unused now.
2020-05-24 15:59:05 +02: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
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
b41838a7fd
Window: Remove extra_input_region API
...
This is unused.
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
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
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
9b98641ddd
window: Use TRUE/FALSE for boolean values
2020-05-17 15:30:03 +02:00
Benjamin Otte
4c7914dc49
display: Remove unneeded getters
...
Applications can use the listmodel instead.
2020-05-17 07:32:37 +02: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
Timm Bäder
9149c79f25
window: Restructure gtk_window_destroy()
...
The previous code was unreffing the window twice, which caused problems
during dialog destruction. Move to g_list_store_find instead of
iterating manually.
ref() the window before and unref() after. g_list_store_remove will
actually unref() the window, since the toplevel_list owns its own
reference.
Fixes #2741
Fixes #2742
2020-05-13 12:18:09 +02:00
Timm Bäder
ddaf50dfcc
window: Create constraint solver on demand
2020-05-13 11:52:16 +02:00
Matthias Clasen
ffcffcd773
window: Hide windows on destroy
...
I thought I could get away with just unrealizing the
window, but it turns out that gtk_window_hide() is the
place where we remove grabs when a modal dialog goes
away, so we ended up with stuck grabs.
2020-05-12 11:10:36 -04:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
501eda2956
window: Fix accessible implementation
...
Now that GtkWindow is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
cc28a7b0ef
Merge branch 'wip/tintou/doc-fixes' into 'master'
...
docs: Fix several missing references in the documentation
See merge request GNOME/gtk!1874
2020-05-11 18:40:34 +00:00
Corentin Noël
076b2f11d2
docs: Fix several missing references in the documentation
...
This fixes several typos and missing references
2020-05-11 19:26:20 +02:00
Matthias Clasen
177c0eb9e2
Unset tooltip window earlier
...
This avoids a crash when the tooltip window tries
to update its action muxers.
2020-05-11 12:20:59 -04:00
Matthias Clasen
1306727fb1
window: Remove _set_has_user_ref_count
2020-05-11 12:20:59 -04:00
Matthias Clasen
6aebedb8bc
window: Implement gtk_window_destroy
...
Don't call gtk_widget_destroy; instead implement
gtk_window_destroy outselves by removing the window
from the toplevel lista and dropping the reference that
GTK holds.
2020-05-11 12:20:59 -04:00
Matthias Clasen
025375ff5f
Replace gtk_widget_destroy everywhere
...
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
2020-05-11 12:20:59 -04:00
Matthias Clasen
cd0081d08a
Use gtk_window_destroy
...
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Matthias Clasen
48821a64d0
window: Add gtk_window_destroy
...
This is a replacement for gtk_widget_destroy for toplevels.
For now, it is just a wrapper.
2020-05-11 12:19:39 -04:00
Matthias Clasen
8f9c3ed44a
Stop using gtk_widget_destroyed
...
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
2020-05-11 12:19:37 -04:00
Matthias Clasen
b93631164f
Remove lots of focus vfuncs
...
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
2020-05-11 00:11:37 -04:00