Commit Graph

7 Commits

Author SHA1 Message Date
Emmanuele Bassi
9a16b1b971 docs: Remove duplicate documentation stanzas 2021-03-11 16:37:31 +00:00
Rico Tzschichholz
df70dbbae4 gdk: Use correct parameter name to fix g-ir-scanner warning
../gdk/gdktoplevellayout.c:217: Warning: Gdk: gdk_toplevel_layout_get_maximized:
  unknown parameter 'maximized' in documentation comment, should be 'maximize'
2020-12-16 20:19:05 +01:00
Jonas Ådahl
142f7862ed gdk/toplevellayout: Change API to be about intent, not full state
When being fullscreen, and wanting to unfullscreen but not caring about
whether to go unmaximized or maximized (as this information is lost), if
the GdkToplevelLayout represents the full intended state, we won't be
able to do the right thing.

To avoid this issue, make the GdkToplevelLayout API intend based, where
if one e.g. doesn't call gdk_toplevel_set_maximized() with anything, the
backend will not attempt to change the maximized state.

This means we can also remove the old 'initially_maximized' and
'initially_fullscreen' fields from the private GtkWindow struct, as we
only deal with intents now.
2020-12-16 14:16:08 +01:00
Emmanuele Bassi
e3fbc0ee9c docs: Fix typo in the GdkTolevelLayout annotation 2020-12-01 13:38:33 +00:00
Jonas Ådahl
2ff74eb667 gdk/toplevel: Negotiate surface size via a compute-size signal
GTK will not up front know how to correctly calculate a size, since it
will not be able to reliably predict the constraints that may exist
where it will be mapped.

Thus, to handle this, calculate the size of the toplevel by having GDK
emitting a signal called 'compute-size' that will contain information
needed for computing a toplevel window size.

This signal may be emitted at any time, e.g. during
gdk_toplevel_present(), or spontaneously if constraints change.

This also drops the max size from the toplevel layout, while moving the
min size from the toplevel layout struct to the struct passed via the
signal,

This needs changes to a test case where we make sure we process
GDK_CONFIGURE etc, which means we also needs to show the window and
process all pending events in the test-focus-chain test case.
2020-08-05 15:49:00 +02:00
Matthias Clasen
61c83f9ffe gdk: Documentation fixups
Document some missing symbols.
2020-06-05 20:59:51 -04:00
Matthias Clasen
c0c387020b Introduce GdkToplevelLayout
This will be used in a new GdkTopleve interface in
the near future.
2020-03-12 14:44:03 -04:00