The plan is to concencrate size computations as part of the frame clock
dispatch, meaning we shouldn't do it synchronously in the present()
function.
Still, in Wayland, and maybe elsewhere, it is done in the present()
function, e.g. when no state change was made, but this will eventually
be changed.
Mapping a surface under Wayland is an asynchronous process, where one
creates a surface and commits an initial state without having drawn
anything, then waiting for a configuration, which then is acknowledged
and content is painted and committed. Not until having received this
configuration is a surface actually mapped, so wait with setting the
mappedness until this.
We don't need the OpenGL view to be transparent if the window itself
is not transparent. This has the potential to speed up the compositing
of the GL view onto the NSWindow.
This fixes an issue where we would ignore events with Y delta
and no X delta while scrolling due to a typo when checking for
any delta.
This fixes deceleration of kinetic scrolling on the macOS backend.
Fixes#3418
We need to keep this consistent so that we can look things up
faster in other places. Therefore, just take the hit here and clear
the entire list ensuring prev/next poniters are cleared.
The keycode and modifier (state) parameters are in the wrong order
for gdk_key_event_new() in the gdk win32 backend, which causes
key up/down events to be populated incorrectly.
This isn't done automatically for us, so we need to synthesize it in
our hide helper.
With this commit, we properly re-focus the new main/key window after
we have closed a transient-for window.
We need to re-attach to the transient-for window whenever we present or
we risk getting placed behind the window by the display server. Apparently
that setting does not persist across a hide of the NSWindow.
since http RFC state that the header names should be processed case in-sensitive, broadway should not rely on the actual case. E.g. the go-language libraries tend to rewrite the header, which cause problems with e.g. Caddy
Fixes#3406
In gdk/win32/gdkmonitor-win32.c in function
populate_monitor_devices_from_display_config() refresh->Numerator * 1000
overflows for refresh->Numerator > 4294976.
Cast the factor 1000 to UINT64 to prevent the overflow.
Fixes#3394
Use the set_minimized method of the xdg_toplevel
interface to implement minimization as well as possible.
It is not possible, since there is no corresponding
state that we could use to update our surface state,
but in practice, it works well enough.
Fixes: #2688
This commit fix the warning:
../gdk/wayland/gdkdisplay-wayland.c:1079: Warning: GdkWayland: gdk_wayland_display_set_cursor_theme: unknown parameter 'name' in documentation comment, should be 'theme'
Currently GTK can be built with G_ENABLE_DEBUG which enables various debug code and parsing
of those env vars, or without, which instead of parsing them prints a warning if they are set.
While building with G_ENABLE_DEBUG isn't strictly needed it's the only way to make GTK_DEBUG=interactive work,
which is a nice thing to have always.
This enables parsing of those env vars in any case and allows specific values being marked as also
available when not built with G_ENABLE_DEBUG (interactive for example). If not built with G_ENABLE_DEBUG
then all unavailable values will be marked as such in the help output and a note is added that
GTK needs to be built with G_ENABLE_DEBUG to use them, which should help discoverability.
Once we figure out what is going on with textures, changes are we'll be
able to let this stay a zero rect. But that is still a bit up in the air right now.
When we close grabbing popups due to an outside
click, check at each level if the click is still
outside. This makes closing the nested popover
menu in the popover on page 3 of widget-factory
work as expected, when you click the menubutton
again.
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
We can just call gdk_surface_invalidate_rect here
like we do elsewhere in gdk, and I'm a bit uncertain
about the current code that adds an empty update
region.
The Cairo implementation for the Macos backend uses a toplevel
window with full transparency and a series of NSView to create opaque
regions. This improves compositor performance because it allows the
display server to avoid costly blends.
However, we want to ensure we clip better when exposing the
transparent region so that we only expose the shadows/corners as
necessary.
This typedef was not used in any public APIs, and is
only used in the MacOS backend. It is not worth preserving
as public API, move it to the only user.
This implements the basics for a GdkGLContext on macOS. Currently, rendering
only is fully working for the GskCairoRenderer case where we read back pixels
into a cairo surface for rendering. More work on synchronization is required for
the GL on GskGLRenderer case.
When we attempt to render a surface itself with GL, the context will ensure that
the new GdkMacosGLView is placed within the NSWindow. In other cases, we
use a dummy NSView and NSWindow for backing the NSOpenGLContext to
ensure that we can get accelerated drawing.
This gets GtkGLArea working when running with GSK_RENDERER=cairo.
This helps a situation where the window contents has not changed
in time for a drawing. Setting the texture gravity helps that side or
corner to be less jittery while moving.
Ideally, we can get to a point where we are synchronized and keeping
up with drawing fast enough to not need this. That may require some
work to drive frame clocks from drawRect: though.
The current code was marking queued events as flushed,
but left them in the queue. That doesn't make sense to
me - we should deliver all events we have before we
reach the paint phase of the frame cycle.
GLDEBUGPROC callback is defined with APIENTRY which is a windows
specific calling convention. That macro expands to nothing when building
on other platforms.
Fixes: #3268.