The cursor-theme-size setting is documented as
'0 means the default size'. Make it so by using
size 24 if we see a 0. Its better than crashing.
Fixes: #5700
The function is going away, and the computation
here was wrong anyway. Instead, add a helper that
properly computes the pointing-to rect in surface
coordinates and use it everywhere.
The widget paintable uses the widgets bounds
as intrinsic size, so we need to offset from
that to the allocation, which is what the
coordinates are relative to.
Text handles had the same problem as popovers.
They were interpreting their pointing-to rectangle
relative to the widgets bounds, when it is meant
to be relative to the widgtets allocation.
While we touch this code, rewrite it to use
gtk_widget_compute_point.
When we don't have a pointing-to rectangle, we want to place
the popover wrt to the parents bounds. But if we have a
pointing-to rectangle, it is relative to the widgets allocation,
which is different from the bounds.
We were not handling the second case correctly, leading to context
menus in the text view being mispositioned by the widgets CSS padding.
While we are touching this code, rewrite it to handle transforms.
Fixes: #5695
Since we are making GdkGLContext call the core wgl*() functions directly
instead of via libepoxy, drop the workarounds that we needed for notifying
libepoxy that wglMakeCurrent() outside of GDK/GTK was called.
This way, we clean up the code, and as a result, we can use the GstGL
APIs like the other platforms to query what GL api that is to be used.
For ensuring that things work between different threads, we now call
gdk_gl_context_clear_current() in place of calling wglMakeCurrent(xxx,
NULL), so that we make sure that there is no current GL context on a
thread outside of GstGL's thread, which Windows does not like.
We might be dealing with GL contexts from different threads, which have more
gotchas when we are using libepoxy, so in case the function pointers for
these are invalidated by wglMakeCurrent() calls outside of GTK/GDK, such as
in GstGL, we want to use these functions that are directly linked to
opengl32.dll provided by the system/ICD, by linking to opengl32.lib.
This will ensure that we will indeed call the "correct" wgl* functions that
we need.
This should help fix issue #5685.
When the GL texture already has a mipmap, we don't
have to download and reupload it to generate one.
We differentiate the handling for texture scale nodes,
where we do want to force the mipmap creation even if
it requires us to reupload the GL texture, and plain
texture nodes, where we just take advantage of a
preexisting mipmap to allow trilinear filtering for
downscaling, or create one if we have to upload the
texture anyway.
Make GdkGLTexture determine if the texture has
a mipmap, and provide private API to query this
information.
This check is done in gdkgltexture.c instead of
gskgldriver.c, since we're already binding the
texture here for other reasons, so it is easy
to query a few more things.
- grab_focus() on a row (happens with scroll_to()) keeps the focus
column intact if possible.
- <Tab> and <Shift-Tab> move through the cells in order, and move
to the next row when at the end.
- <Up> an <Down> move to the next/prev row, keeping the same column
focused.
- <Left> and <Right> move to the prev/next cell, if one is available.
If not, they stay where they are.
Make it move focus just like GtkWindow would.
Otherwise the listview will (try to) handle it and move focus between
cells - which doesn't do anything for lists and only works with grids.
This is a split of GtkListItemWidget into the generic parts of factory
using widgets.
On top of it there's GtkListItemWidget, which takes care of GtkListItem.
They're not used outside of GtkListBase, so no use to have them in the
header.
Requires moving one function up in the source now that the forward
declaration is missing.