Commit Graph

63093 Commits

Author SHA1 Message Date
Benjamin Otte
bc88f01165 win32: Use a GListStore for the monitors 2020-05-13 06:45:08 +02:00
Benjamin Otte
7ff69e9356 x11: Use a GListStore for the monitors 2020-05-13 05:22:18 +02:00
Benjamin Otte
188e28e196 display: Remove unused vfunc 2020-05-13 04:51:52 +02:00
Benjamin Otte
3536bdd7a6 wayland: Use a GListStore for the monitors
Guess where this is going...
2020-05-13 04:51:52 +02:00
Benjamin Otte
c0c8e93d90 display: Remove gdk_display_get_last_seen_time()
Replace the only usage - in the X11 backend - with an X11-specific call.
2020-05-13 04:48:22 +02:00
Matthias Clasen
8d9a3de65a Merge branch 'matthiasc/for-master' into 'master'
x11: Avoid a critical in clipboard data transfer

Closes #2736

See merge request GNOME/gtk!1887
2020-05-13 02:10:20 +00:00
Matthias Clasen
c66f2ca9eb x11: Avoid a critical in clipboard data transfer
The handler we are calling here asserts that it gets
an interned string as mime_type. So give it one.

Fixes: #2736
2020-05-12 21:31:19 -04:00
Matthias Clasen
9c13bf70a7 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1885
2020-05-12 21:18:03 +00:00
Matthias Clasen
a4debecfb1 Merge branch 'tests-cleanup' into 'master'
Tests cleanup

See merge request GNOME/gtk!1884
2020-05-12 21:17:29 +00:00
Matthias Clasen
b230ea2140 paned: Don't ignore the type attribute
We were meaning to only handle <child> here for
compatibility, not <child type="somethingelse">.
2020-05-12 16:27:25 -04:00
Matthias Clasen
a37dc29850 paned: Drop the Private struct 2020-05-12 16:25:58 -04:00
Matthias Clasen
fe6238d1c4 tests: Drop the visuals test
This was just a different way to load a ui file
and try it with dark mode. This can be done
with gtk-builder-tool preview and GTK_THEME.
2020-05-12 15:56:46 -04:00
Matthias Clasen
e7bf4a3de8 tests: Move testcairo into gtk4-demo
Replace the boring checkboard pattern with this
exciting drawing, and save one test binary at the
same time!
2020-05-12 15:43:43 -04:00
Matthias Clasen
c133db4364 Drop the gtkgears test
This has recently been moved to gtk4-demo.
No need to duplicate it.
2020-05-12 15:43:43 -04:00
Matthias Clasen
694daa1d20 Move print-editor to demos
It is too demo-esque for languishing in tests/.
2020-05-12 15:43:43 -04:00
Matthias Clasen
f858a269dd NEWS: Updates 2020-05-12 15:14:09 -04:00
Matthias Clasen
c916221f59 Merge branch 'matthiasc/for-master' into 'master'
printoperation-unix: Fix a use-after-free

See merge request GNOME/gtk!1883
2020-05-12 18:54:59 +00:00
Emmanuele Bassi
80539811c0 Merge branch 'docs-fixes' into 'master'
Docs fixes

See merge request GNOME/gtk!1882
2020-05-12 18:40:34 +00:00
Matthias Clasen
09ea880a43 printoperation-unix: Fix a use-after-free
It turns out that finish_print destroys the
PrintResponseData, so we can't access it afterwards.
2020-05-12 14:09:51 -04:00
Emmanuele Bassi
58774eea72 docs: Add annotations for GtkPaned new getters
Which means also adding gtk-doc stanzas.
2020-05-12 18:52:45 +01:00
Emmanuele Bassi
68682dda89 docs: Remove unnecessary SECTION
The GdkDragSurface definitions fall under the "dnd" section.
2020-05-12 18:44:21 +01:00
Emmanuele Bassi
6ae01f9815 docs: Remove redundant SECTION
We already have a SECTION stanza for gtk-doc.
2020-05-12 18:43:56 +01:00
Carlos Garnacho
3b9a8194a5 Merge branch 'wip/carlosg/broken-grabs' into 'master'
Fixes to broken grabs

Closes #2665

See merge request GNOME/gtk!1879
2020-05-12 16:14:47 +00:00
Matthias Clasen
fdc9bfa2e9 Merge branch 'matthiasc/for-master' into 'master'
window: Hide windows on destroy

See merge request GNOME/gtk!1881
2020-05-12 15:58:10 +00:00
Carlos Garnacho
9103fd6687 gtkmain: Release the active state on GDK_GRAB_BROKEN
This is handled internally here, but misses broken grabs. The active
state should be dropped just as if the button were released.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2665
2020-05-12 17:39:54 +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
450879b1da Merge branch 'matthiasc/for-master' into 'master'
Documentation work

See merge request GNOME/gtk!1880
2020-05-12 14:52:01 +00:00
Matthias Clasen
c6cdd36586 Merge branch 'ebassi/run-dialog-run' into 'master'
Remove gtk_dialog_run() and friends

Closes #371

See merge request GNOME/gtk!1801
2020-05-12 14:29:54 +00:00
Emmanuele Bassi
717d4abebb Do not release the GFile prematurely
Otherwise we won't be able to access it to get the URI for the
GtkPrinterOption.

This fixes a regression introduced in commit 5f070ff233.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
e8c4b8338f docs: Mention blocking functions in the migration guide
Link to how to make a dialog modal, and to the response signal.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
d54b7dec94 Remove gtk_dialog_run()
Nested main loops are bad, as they introduce layers of complexity caused
by the potential re-entrancy in the case of multiple event sources, like
IPC, threads, etc. Additionally, the programming model they provide—stop
the world while spinning a new loop—does not conform to the event-driven
model employed by GTK.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
0a6848d70b Remove gtk_dialog_run() from GtkPrintUnixDialog
Replace it with an explicit nested main loop, as we need to block the
signal handler currently being emitted depending on the response of the
overwrite confirmation dialog.

This is a bit of a hack, and the only reason we need it is that the
print dialog will load the last used path as the output file name, when
printing to a file; this means that, in theory, it would be possible to
press Print without selecting a file, and accidentally overwriting an
existing file.

It would be much simpler if we did not store the last used path, and
always explicitly asked the user to select a file; this would avoid
destructive actions, and would allow us to rely on the overwrite
confirmation dialog right inside the file chooser.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
b8988be4b5 Remove unnecessary deprecation pragmas
The gtk_window_present() function is not deprecated.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
45eec06500 Drop gtk_dialog_run() from GtkPrintOperationUnix
We still provide a blocking API, but we should strongly reconsider it.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
2090dbb27d tests: Remove gtk_dialog_run()
Either use the "response" signal for dialogs that are already modal, or
use an explicit nested loop for tests that rely on the response id being
available in sequence.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
96856527e6 Drop gtk_dialog_run() from GtkFileChooserWidget
The various dialogs we use inside the file chooser are modal already,
and do no need a nested loop.
2020-05-12 13:22:09 +01:00
Emmanuele Bassi
f81e6042be docs: Remove use of gtk_dialog_run()
Direct people to use GTK_DIALOG_MODAL and the "response" signal instead
of nested main loops.
2020-05-12 13:18:38 +01:00
Emmanuele Bassi
5d272a12cb Remove gtk_native_dialog_run()
Nested main loops are bad, as they introduce layers of complexity caused
by the potential re-entrancy in the case of multiple event sources, like
IPC, threads, etc. Additionally, the programming model they provide—stop
the world while spinning a new loop—does not conform to the event-driven
model employed by GTK.
2020-05-12 13:15:19 +01:00
Emmanuele Bassi
3212b07cf1 docs: Remove use of gtk_native_dialog_run() from examples
Use the "response" signal instead.
2020-05-12 13:15:19 +01:00
Emmanuele Bassi
f573a1f3f2 Remove gtk_dialog_run() from GtkMountOperation 2020-05-12 13:15:16 +01:00
Carlos Garnacho
fbd0c8dc34 gtkmain: Propagate GDK_GRAB_BROKEN events to/from current focus
Let keyboard/pointer paths handle their own events, and find the
current focus. The event will be propagated through instead of
being just emitted on the toplevel.

This makes it handled throughout all the gestures that want to
know about it.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
e33af5895f gdk/wayland: Drop explicit ungrab after surface move/resize
We now break grabs properly if receiving a .leave event with
active buttons. This is not necessary anymore.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
f7d2985f89 gdk/wayland: Ensure .leave events with active buttons breaks grabs
Instead of silently ending up the grab, make it sure that we emit
a GDK_GRAB_BROKEN event if needed.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
2bd8124b5d gdk/wayland: Keep track of implicit grabs
Tracking of those broke sometime along the gdk cleanups, so we
started missing some GDK_GRAB_BROKEN events from being emitted
(eg. after a button press/implicit grab triggers an active grab).

Implicit grabs are only added if there's no prior grab (either
implicit through other button presses, or explicit), in order to
keep accounting correct, make those prevail.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
5e765eaac4 gtktexthandle: Set css name on GtkWidgetClass
Handles are their own widget, special names are not necessary
anymore.
2020-05-12 14:14:39 +02:00
Emmanuele Bassi
4d09bf3b9b demos: Remove gtk_dialog_run()
Use modal dialogs and the "response" signal.
2020-05-12 13:12:08 +01:00
Matthias Clasen
6df8bf7dde docs: Updates to the migration guide
Remove some duplicated content, reorder things
to make more sense, and tweak the wording.
2020-05-12 07:50:17 -04:00
Matthias Clasen
d8db984890 docs: Tweaks
Replace some occurrences of GTK+ by GTK.
2020-05-12 07:50:12 -04:00
Matthias Clasen
072adbf079 docs: Updates to the common questions
Refresh the answers to some common questions.
2020-05-12 01:03:34 -04:00
Matthias Clasen
1ef6a35f3e docs: Don't point at mailing lists
Replace references to the mailing lists by
discourse + irc.
2020-05-12 01:02:49 -04:00