Commit Graph

52702 Commits

Author SHA1 Message Date
Lukas Oberhuber
16ded6835c macos: Fix to offscreen window selections in Gimp 2.99 2022-05-27 21:26:50 +00:00
Matthias Clasen
75d3095a6b Merge branch 'wayland-cursor-size' into 'gtk-3-24'
wayland/cursor: Sanity check cursor image size

See merge request GNOME/gtk!4381
2022-05-27 11:02:22 +00:00
Emmanuele Bassi
1cf58407be Merge branch 'dont-dist-gresource-srcs' into 'gtk-3-24'
Don't dist some generated sources

See merge request GNOME/gtk!4738
2022-05-25 13:22:23 +00:00
Luca Bacci
02b40fd64d Merge branch 'msvcproj-nmake-install' into 'gtk-3-24'
Cleanup Visual Studio project files a bit

See merge request GNOME/gtk!4734
2022-05-25 08:23:58 +00:00
Matthias Clasen
eb4d736a4d Merge branch 'quartz-redraw-pixbuf' into 'gtk-3-24'
quartz: Use CALayer to back GdkQuartzView

See merge request GNOME/gtk!4728
2022-05-21 13:15:21 +00:00
John Ralls
b94ed34f9c [quartz] Manage implementation surface lifetime.
To prevent leaking cairo surfaces while persisting the parts that
don't need to be redrawn.
2022-05-19 17:02:55 -07:00
John Ralls
df94d0168d Use a CVPixelBuffer instead of a CGImage. 2022-05-19 16:58:39 -07:00
John Ralls
be60902805 Draw window to image_surface and apply to CALayer. 2022-05-19 16:52:59 -07:00
John Ralls
2d3eb0c6a7 [quartz] Draw needs_display_region if available 2022-05-19 16:46:35 -07:00
John Ralls
8182c978db quartz: add CVDisplayLink based frame clock
This uses CVDisplayLink to drive the GdkFrameClock. A GdkWindow
can register a frame callback to thaw their frame clock as necessary
based on the next notification from CVDisplayLink.

CVDisplayLink notifies us on a high-priority thread. We use the same
NSEventas gdkeventloop-quartz.c to wakeup the main loop. This is done
so that we don’t pathologically wake up the select thread to then
continue notifying the main loop.

We use an embedded GList node in the GdkWindowImplQuartz so that we
can avoid allocating any lists or arrays for pending frame callbacks.
Compare this to the same design in GdkWindow for children.
2022-05-19 16:29:01 -07:00
Chun-wei Fan
ff847c43ad Drop win32/Makefile.msvc-introspection
We no longer use the autotools 'dist-hook' to generate the items that we
need to build introspection with the Visual Studio projects, so drop the
autotools files and bits that we had to support this.  So, for
introspection on Visual Studio via the project files, it is purely via
NMake at this point.
2022-05-19 11:33:25 +08:00
Chun-wei Fan
fe548537f9 build: Write introspection rules directly in NMake Makefiles
By doing so, we can drop the autotools rules that we use to generate the
file lists and rules for building introspection via NMake Makefiles for
Visual Studio builds via the project files.
2022-05-19 11:22:12 +08:00
Chun-wei Fan
c05d21c9af gtk: Build: Prefix deprecated source listings
...with gtk_, so that they are distinguished from other names and is
more clear to people.
2022-05-19 10:58:01 +08:00
Chun-wei Fan
574bd57f72 gtk-sources.inc: Split base sources in two parts
Otherwise, NMake will choke when creating a filelist from it.  This
U1095 error is nasty! :|
2022-05-19 10:58:01 +08:00
Chun-wei Fan
7c2e4fa3b2 gdk: Move source listings to gdk-sources.inc
We want to share those listings with other non-autools build systems.
2022-05-19 10:57:55 +08:00
Chun-wei Fan
f324c650a7 gdk/: Rename gdk-pub-headers.h to gdk-sources.inc
We want to make the sources listings for libgdk shared as well.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
6e193eb141 win32/vs10/*.vcxproj: Consolidate project configs
Like what was done in the *.vcxprojin templates, consolidate project configs
that are repetitive, and use the 'Condition=' directive to distinguish between
configuration and/or target platform differences.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
3bd1ed8c31 win32/vs10/*.vcxprojin: Consolidate project configs
We can use MSBuild "Condition" items to consolidate the configs, so that we can
clean up the project files a bit.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
4c2cd5910f Visual Studio projects: Make property sheets shared
...for Visual Studio 2010 and later, since we used to copy them and
merely update the value of $(VSVer) during 'make dist' as needed.

Instead of doing that, move the property sheets for Visual Studio 2010,
which is the base version that we use, into a directory of its own, and
make the Visual Studio 2010~2022 projects look for them in that
directory, and set VSVer according to the toolset version identified by
each of the project files.

The ARM64-specific property sheet needed for VS2017 and the VS2008
property sheets will remain as they are.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
ac25eeb34a Visual Studio projects: Drop another property sheet
We can again use MSBuild trickery to do what was done in the dropped
property sheet.

Unfortunately, like the last commit, I couldn't figure out a way do to
something similar in the VS2008 project files... :|
2022-05-19 09:41:48 +08:00
Chun-wei Fan
c50cd6f95c Visual Studio projects: Drop unneeded property sheet
We can use MSBuild trickery to do what the property sheet intends to
cover
2022-05-19 09:41:48 +08:00
Chun-wei Fan
f4811ea1f1 build: Drop gtk3-install.[vsprops|props]
They are not used anymore, and are removed at this point.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
455686a57f Visual Studio Projects: Use NMake Makefile to copy build results
... and so stop using gtk3-install.[vsprops|props], and remove that
property sheet from the dist and dist the NMake Makefile for the
purpose.

Also remove win32/vs10/gtk3-install.vcxproj.filters as well, as it is
no longer needed.

We will remove the gtk3-install.[vsprops|[props][.in] in a subsequent
commit.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
3b5b8bbebe win32/: Add install-msvc.mak
This is an NMake Makefile that will replace the property sheets in the
Visual Studio project files so that we can call it from the project
files to "install" the binaries and introspection files that were built,
along with the header files and other data files, which aims to be
easier to maintain for the current approach.

This will also be expanded upon to optionally build the translation
files and make the installed files more in-line with what are done in
the Meson build files, where there could be compatibility problems with
older Visual Studio toolchains.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
331090c148 win32/create-lists-msvc.mak: Pull in the newly-split source listings
We are going to use them to help us to use an NMake Makefile to copy the
built files and headers in our "install" directory.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
8477c0e765 win32/create-lists-msvc.mak: Clean up a bit
We now have the theme CSS source listings in gtk/gtk-sources.inc, so
make use of it.  No need to repeat items from there.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
ea3b599d7f libgail-util: Split out sources listings
We want to share the listings with other non-autotools build systems.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
aa83f9fb42 gtk/Makefile.am: Split out more items
... to gtk-sources.inc, since we will want to share the items in the lists that
were split out.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
e21a578cb1 gtk: Rename gtk-mkenums-headers.mak to gtk-sources.inc
We want to reuse more sources listings in other non-autotools build
systems.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
def4b6c95f gdk/broadway: Split out sources listing
This way, we can reuse these lists in other non-autotools Makefile-based
build systems.
2022-05-19 09:41:47 +08:00
Chun-wei Fan
cb494e0ad8 gdk/win32: Split out sources listing
This way, we can reuse this list in other non-autotools Makefile-based
build systems.
2022-05-19 09:41:47 +08:00
Matthias Clasen
4e3a3f0553 3.24.34 3.24.34 2022-05-18 14:52:03 -04:00
Chun-wei Fan
0264e2d6a6 demos: Fix distcheck
Make sure that we remove the files generated by glib-compile-resources
during distclean.
2022-05-18 17:48:16 +08:00
Chun-wei Fan
bac9ff22f5 gtk/Makefile.am: Fix distcheck
Apparently distcheck expects the generated gtk.gresource.xml to be
there.
2022-05-18 15:32:21 +08:00
Chun-wei Fan
dc9d60fc9a win32: Update Visual Studio projects
This is a follow-up commit so that the generated GResources sources for
the demos are included in the project files.

As a result, don't include demo_resources.c when regenerating
gtk3-demo.vc[x]proj for toggling on or off the font features demo, as it
would have been there.
2022-05-17 23:50:24 +08:00
Chun-wei Fan
472c40fd3f demos: Don't dist the generated GResource sources
The Visual Studio projects have support for generating these, especially
that the encoded string that result from them may become too big for the
Visual Studio compiler to handle (such as for gtk3-demo) and we are normally
supposed to generate the GResources sources for all builds, as the
generated code depends on the compiler being used).
2022-05-17 18:44:58 +08:00
Chun-wei Fan
39940e0892 gtk/: Don't distribute the generated sources
We already generate some of the sources for all builds, so extend this
to the other generated sources as well, since the Visual Studio projects
added support for generating these sources too.
2022-05-17 18:43:36 +08:00
Chun-wei Fan
abbf7a3497 gdk/: Don't distribute the built sources
The Visual Studio projects have support for generating these items, so
we don't really need to distribute them with the sources.
2022-05-17 18:42:37 +08:00
John Ralls
3c721c5a80 quartz: drop beam sync penalty code
Now that we have a frame clock in place, we should be able to drop
the beam-sync penalty prevention code as we should be aligning our
draws with CVDisplayLink.
Originally by Christian Hergert <chergert@redhat.com>, flushWindow
corrections and improvements by John Ralls.
2022-05-05 16:19:02 -07:00
Christian Hergert
0c439e4b83 quartz: squash compiler warning about enums
We don’t care about the other enums, fine to squash the warning.
2022-05-05 16:08:54 -07:00
John Ralls
b72e4437a2 quartz: Clean up two macOS deprecation warnings. 2022-05-05 16:07:47 -07:00
John Ralls
acc1eb917b Quartz: Don't crash trying to release a NULL CGContext. 2022-05-05 16:04:42 -07:00
Matthias Clasen
01edbfb976 Merge branch '3-24-build-with-array-bounds' into 'gtk-3-24'
gtkimagedefinition: Check array bounds

See merge request GNOME/gtk!4677
2022-05-03 17:47:43 +00:00
Matthias Clasen
75beff2e13 Merge branch 'wip/carlosg/im-wayland-backports-3.24' into 'gtk-3-24'
gtk/imwayland: Use serial to control outbound messages

See merge request GNOME/gtk!4682
2022-05-03 16:36:10 +00:00
Matthias Clasen
3e4c9b1f04 Merge branch 'wip/another-randr-error-trap' into 'gtk-3-24'
[3.24] x11: Trap errors happening when getting output properties

See merge request GNOME/gtk!4680
2022-05-03 00:46:32 +00:00
Carlos Garnacho
5321fa25a5 imcontextwayland: Ignore preedit updates from NULL to NULL
If we get consecutive preedit string updates that announce a NULL
string, we still do end up issuing ::preedit-changed with those.
Ignore changes from NULL to NULL, it is the other combinations which
must issue this signal.
2022-05-02 23:34:09 +02:00
Carlos Garnacho
49b6410c26 imwayland: Do not defer commit() after set_surrounding_text()
For reasons that only apply to the old serial handling, asking for
the surrounding after IM changes resulted in lazy handling of
commit() afterwards.

With the recent interpretation of serials, this problem became more
apparent, since it is in fact very likely that the last interaction
step after an IM change is notifying of the changed surrounding
text after the IM change was applied.

Make handling of surrounding text similar to caret position changes,
always commit() after the state change, but skip through non-changes.

This makes the compositor state fully up-to-date after an IM change.

(cherry-picked from commit eb7c78aa48)
2022-05-02 23:34:09 +02:00
Carlos Garnacho
802a748e5b gtk/imwayland: Use serial to control outbound messages
Following the text-input protocol changes at
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/115,
use the serial number to have the client push changes to the
zwp_text_input_v3 object only after compositor/client states match.

This specifically is more lenient to compositors pushing multiple
.done events ahead of the client replying to them.

(cherry-picked from commit f108f053d4)

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4853
2022-05-02 23:33:37 +02:00
Jonas Ådahl
9addb14a83 x11: Trap errors happening when getting output properties
This is to avoid getting X11 errors (thus aborting/exiting with a
failure) during rapid hotplugs, which may happen during e.g. CI testing.
2022-05-02 16:49:23 +02:00
Peter Bloomfield
54d319bc32 gtkimagedefinition: Extend commit b38266c0
Similarly, uses casts in `gtk_image_definition_unref()`. Compilation
succeeds without them, unlike in `gtk_image_definition_ref()`, because
`gtk_image_definition_unref()` is not called internally, unlike
`gtk_image_definition_ref()`. But the build would fail if some function
defined in the module were changed in the future to call
`gtk_image_definition_unref()`, and we can future-proof it now. This
also removes an inconsistency in how we access the members of the union.
2022-04-30 13:09:04 -04:00