Matthias Clasen [Wed, 2 May 2018 03:26:28 +0000 (23:26 -0400)]
Add missing types to gtk docs
Matthias Clasen [Wed, 2 May 2018 03:22:13 +0000 (23:22 -0400)]
Add missing types to gdk docs
Timm Bäder [Tue, 1 May 2018 10:51:04 +0000 (12:51 +0200)]
gl renderer: Ignore nodes outside of the clip
Pretty sure this will bite me later but for now we avoid rendering nodes
that we are not going to see anyway.
Timm Bäder [Tue, 1 May 2018 06:19:48 +0000 (08:19 +0200)]
gl renderer: Use simple offset for selected offset node children
Timm Bäder [Sat, 21 Apr 2018 18:14:05 +0000 (20:14 +0200)]
widget: add shortcut to gtk_widget_set_child_visible
So we don't do unnecessary work when just setting priv->child_visible to
the same value again.
Timm Bäder [Sat, 21 Apr 2018 17:44:45 +0000 (19:44 +0200)]
widget: Don't mention gtk_widget_snapshot() in the docs
It's not public so people can't know about it.
Matthias Clasen [Tue, 1 May 2018 12:35:53 +0000 (12:35 +0000)]
Merge branch 'wip/carlosg/controller' into 'master'
carlosg/controller
See merge request GNOME/gtk!131
Rico Tzschichholz [Tue, 1 May 2018 10:35:32 +0000 (12:35 +0200)]
Fix some g-i annotation warnings
Matthias Clasen [Tue, 1 May 2018 00:09:57 +0000 (20:09 -0400)]
Fix the modelbutton demo _again_
It lost the action-target properties again.
Emmanuele Bassi [Mon, 30 Apr 2018 16:21:21 +0000 (16:21 +0000)]
Merge branch 'docs' into 'master'
gitlabci: Add gtk-doc to the container image.
See merge request GNOME/gtk!130
Jordan Petridis [Mon, 30 Apr 2018 15:39:05 +0000 (18:39 +0300)]
gitlabci: Add gtk-doc to the container image.
Benjamin Otte [Mon, 30 Apr 2018 12:25:43 +0000 (12:25 +0000)]
Merge branch 'lrn/meson-intl' into 'master'
Link libgtk to libintl
See merge request GNOME/gtk!113
Benjamin Otte [Mon, 30 Apr 2018 11:56:36 +0000 (11:56 +0000)]
Merge branch '169-gtktextview-accesses-already-disposed-object' into 'master'
Resolve "GtkTextView accesses already disposed object"
Closes #169
See merge request GNOME/gtk!109
Mario Blättermann [Mon, 30 Apr 2018 10:42:41 +0000 (10:42 +0000)]
Update German translation
Benjamin Otte [Mon, 30 Apr 2018 09:48:25 +0000 (09:48 +0000)]
Merge branch 'window-activate-grab-4-2.4' into 'master'
gdk: do not deactivate surface on keyboard grab
Closes #85
See merge request GNOME/gtk!120
Samuel Thibault [Thu, 19 Apr 2018 12:10:23 +0000 (14:10 +0200)]
gdk: do not deactivate surface on keyboard grabs
When pressing e.g. a window manager shortcut, which acquires keyboard grab,
Xorg would send FocusOut NotifyGrab then FocusIn NotifyUngrab. Currently
gdk would then deactivate the current surface, which makes accessibility
screen readers think that we have switched to a non-accessible application
and came back again, and thus reannounce the application frame etc. which we
don't want when e.g. just raising volume.
And actually, receiving FocusOut NotifyGrab does not mean losing the
X focus, it only means an application aqcuired a grab, i.e. it is
temporarily stealing keyboard events. On Wayland, this isn't even
notified actually.
This commit makes gdk only deactivate surfaces when there was an actual
focus switch to another window, as determined by has_focus_window (instead
of just has_focus), which happens either normally through FocusOut with
NotifyNormal, or during grabs through FocusOut with NotifyWhileGrabbed.
Fixes #85
Matthias Clasen [Sat, 28 Apr 2018 20:23:32 +0000 (16:23 -0400)]
Misc documentation fixes
Close some gaps in gdk docs.
Matthias Clasen [Sat, 28 Apr 2018 20:20:19 +0000 (16:20 -0400)]
Document GdkMemoryTexture
Matthias Clasen [Sat, 28 Apr 2018 20:02:34 +0000 (16:02 -0400)]
More doc build fixes
If only the errors would make it back to stderr.
Matthias Clasen [Sat, 28 Apr 2018 18:13:34 +0000 (14:13 -0400)]
More doc build fixes
Matthias Clasen [Sat, 28 Apr 2018 14:04:23 +0000 (10:04 -0400)]
Add offset nodes to the docs
Matthias Clasen [Sat, 28 Apr 2018 00:14:03 +0000 (20:14 -0400)]
Fix the gdk doc build
GdkDrawingContext no longer exists.
Fabio Tomat [Sat, 28 Apr 2018 09:19:30 +0000 (09:19 +0000)]
Update Friulian translation
Benjamin Otte [Fri, 27 Apr 2018 10:32:17 +0000 (12:32 +0200)]
dnd: Make GdkDragContext::device a (construct-only) property
Also remove gdk_drag_context_set_device() and insist on backends using
the property.
Benjamin Otte [Fri, 27 Apr 2018 10:25:59 +0000 (12:25 +0200)]
wayland: Create drop contexts on demand
Instead of creating and reusing the same one from start to finish.
Benjamin Otte [Fri, 27 Apr 2018 01:31:39 +0000 (03:31 +0200)]
dragsource: Use capture phase for gesture
Otherwise buttons don't work as drag sources, and we like to do that.
Benjamin Otte [Wed, 25 Apr 2018 22:17:23 +0000 (00:17 +0200)]
gtk-demo: Always have at least 1 icon in the fishbowl
When changing the widget type, don't start out with 0 icons.
Kristjan SCHMIDT [Thu, 26 Apr 2018 23:24:32 +0000 (23:24 +0000)]
Update Esperanto translation
Руслан Ижбулатов [Thu, 26 Apr 2018 17:42:49 +0000 (17:42 +0000)]
imcontextsimple: ensure W32 code only runs on W32 displays
gdk_win32_keymap_check_compose() shouldn't be called for
non-W32 displays (i.e. when using broadway or other backends
that could be made to run on Windows).
Carlos Garnacho [Thu, 26 Apr 2018 15:32:43 +0000 (17:32 +0200)]
gesturestylus: Port to new API model
Carlos Garnacho [Fri, 20 Apr 2018 17:58:06 +0000 (19:58 +0200)]
eventcontrollerkey: Port to new API model
Benjamin Otte [Sat, 10 Mar 2018 19:02:28 +0000 (20:02 +0100)]
eventcontroller: Make widget no longer a construct-only property
The new API model is now complete. To set a widget on a controller, it
is now necessary to call gtk_widget_add_controller().
Benjamin Otte [Sat, 10 Mar 2018 18:10:35 +0000 (19:10 +0100)]
padcontroller: Port to new API model
Benjamin Otte [Sat, 10 Mar 2018 17:45:23 +0000 (18:45 +0100)]
eventcontrollermotion: Port to new API model
Benjamin Otte [Sat, 10 Mar 2018 17:29:57 +0000 (18:29 +0100)]
eventcontrollerscroll: Port to new API model
Benjamin Otte [Sat, 10 Mar 2018 17:05:57 +0000 (18:05 +0100)]
draggesture: Port to new API model
Benjamin Otte [Fri, 9 Mar 2018 05:36:22 +0000 (06:36 +0100)]
longpressgesture: Port to new API model
Benjamin Otte [Fri, 9 Mar 2018 05:14:59 +0000 (06:14 +0100)]
multipressgesture: Port to new API model
Benjamin Otte [Thu, 8 Mar 2018 23:03:15 +0000 (00:03 +0100)]
pangesture: Port to new API model
Benjamin Otte [Thu, 8 Mar 2018 22:49:41 +0000 (23:49 +0100)]
swipegesture: Port to new API model
Benjamin Otte [Thu, 8 Mar 2018 22:40:45 +0000 (23:40 +0100)]
zoomgesture: Port to new API model
Benjamin Otte [Thu, 8 Mar 2018 22:36:41 +0000 (23:36 +0100)]
rotategesture: Port to new API model
Benjamin Otte [Thu, 8 Mar 2018 22:24:30 +0000 (23:24 +0100)]
legacycontroller: Port to new API model
We no longer set the widget on construction, but instead require an
explicit call to gtk_widget_add_controller().
This way, the reference handling becomes explicit and bindable.
Because gtk_widget_add_controller() is (transfer: full), we don't
even need to unref the controller after adding it.
And we don't need to keep track of it, because controllers get cleaned
up by GtkWidget.
Benjamin Otte [Fri, 9 Mar 2018 05:08:31 +0000 (06:08 +0100)]
filechooser: Put event controllers into ui file
Benjamin Otte [Fri, 9 Mar 2018 05:07:44 +0000 (06:07 +0100)]
placesviewrow: Put event controllers into ui file
Benjamin Otte [Fri, 9 Mar 2018 05:06:26 +0000 (06:06 +0100)]
widget-factory: Put gesture into ui file
Benjamin Otte [Fri, 9 Mar 2018 01:10:52 +0000 (02:10 +0100)]
emojichooser: Put event controllers into ui file
Benjamin Otte [Thu, 8 Mar 2018 23:35:18 +0000 (00:35 +0100)]
aboutdialog: Put event controllers into ui file
Benjamin Otte [Thu, 8 Mar 2018 02:13:57 +0000 (03:13 +0100)]
widget: Allow adding event controllers in ui files
Benjamin Otte [Thu, 8 Mar 2018 22:14:06 +0000 (23:14 +0100)]
widget: Expose gtk_widget_add_controller()
.. and gtk_widget_remove_controller().
Benjamin Otte [Thu, 8 Mar 2018 22:03:16 +0000 (23:03 +0100)]
eventcontroller: Move declaration
This is in preparation for exposing APIs in gtkwidget.c
Benjamin Otte [Thu, 8 Mar 2018 02:30:44 +0000 (03:30 +0100)]
eventcontroller: Add vfuncs to (un)set widget
This is the first step towards refactoring how widgets deal with event
controllers.
In the future, the widget will treat controllers the same way it treats
child widgets:
1. The controllers will be created without a widget.
2. There will be gtk_widget_add/remove_controller() functions to add
or remove controllers.
3. The widget will hold a reference to all its controllers.
This way we will ultimately be able to automate controllers with ui
files.
Adrian Johnson [Thu, 12 Apr 2018 09:31:37 +0000 (11:31 +0200)]
Add gtk_printer_get_hard_margins_for_paper_size
to retreive paper size specific hard margins and use this
to set the hard margins in the print context.
(modified by Marek Kasik <mkasik@redhat.com>)
https://bugzilla.gnome.org/show_bug.cgi?id=686109
Fabio Tomat [Thu, 26 Apr 2018 07:52:37 +0000 (07:52 +0000)]
Update Friulian translation
Carlos Garnacho [Wed, 25 Apr 2018 17:07:50 +0000 (19:07 +0200)]
menu: Set up callback with a return function
The function hooked up to the ::key-pressed signal should have
a return value. Pointed out by Peter Bloomfield.
Benjamin Otte [Wed, 25 Apr 2018 14:14:00 +0000 (16:14 +0200)]
comboboxtext: GTK_DISABLE_SINGLE_INCLUDES is not a thing
What you don't find when laughing at vcpkg having a CMake build file for
GTK.
Daniel Mustieles [Wed, 25 Apr 2018 11:18:01 +0000 (13:18 +0200)]
Updated Spanish translation
Carlos Garnacho [Wed, 25 Apr 2018 00:10:01 +0000 (02:10 +0200)]
notebook: Fetch directly current event state/device
gtk_get_current_event() returns a new reference to the event, it should
be freed across various return branches to avoid the event leak, or we
just fetch the little stuff we're interested in.
Carlos Garnacho [Tue, 24 Apr 2018 22:35:00 +0000 (00:35 +0200)]
range: Do not unconditionally stop events in event handler
Prevents keybindings from working on scales.
Carlos Garnacho [Tue, 24 Apr 2018 22:26:02 +0000 (00:26 +0200)]
combobox: Do not unconditionally stop events in event handler
Prevents combobox menus from being closed.
Benjamin Otte [Mon, 23 Apr 2018 16:42:36 +0000 (18:42 +0200)]
cairocontext: Remove fallback implementations
Now that all Cairo contexts are ported to managing cairo surfaces
themselves, the old fallback code that didi the managing is no longer
needed.
Also clarify the behavior of gdk_cairo_context_cairo_create() wrt the
vfunc by doing the early exit and the clipping outside of it.
Руслан Ижбулатов [Tue, 24 Apr 2018 15:14:23 +0000 (15:14 +0000)]
GDK W32: Switch to GdkCairoContext
* Remove DC refcounting (we trust GDK to always do
begin_frame/end_frame calls in pairs)
* Now that there's no GDK-provided double-buffer up the stack,
double-buffering is implemented here
(though it's disabled by default - in my tests it didn't provide
any visual improvements, but did decrease performance).
* For some reason delaying window resizes until the point where
we need to blit the double-buffer into the window leads
to visual glitches, so doulbe-buffered windows are resized
in begin_frame, same as non-double-buffered ones.
* New code to clear the paint region, for all drawing modes.
Hopefully, it isn't duplicated anywhere up the stack.
* GL has its own context now, so remove any GL-related comments.
* Layered windows are still used (because cairo actually works
better with them)
* A bit more code re-use for layered windows
* Some functions that were local to gdksurface-win32.c are made
usable for the whole backend
* Drag-indicator drawing is temporarily commented out to match
a similar change in X11 backend
Alexander Larsson [Tue, 24 Apr 2018 14:05:28 +0000 (16:05 +0200)]
broadway: Handle offset nodes
Alexander Larsson [Tue, 24 Apr 2018 14:04:57 +0000 (16:04 +0200)]
broadway: Handle cairo nodes of type recording surface
Alexander Larsson [Tue, 24 Apr 2018 13:39:53 +0000 (15:39 +0200)]
broadway: Add and use GdkBroadwayDrawContext
Alexander Larsson [Tue, 24 Apr 2018 12:31:49 +0000 (14:31 +0200)]
broadway: Add basic GdkCairoContext implementation
Alexander Larsson [Tue, 24 Apr 2018 12:31:24 +0000 (14:31 +0200)]
broadway: Call _gdk_surface_update_size when resizing surface
Benjamin Otte [Mon, 23 Apr 2018 21:26:14 +0000 (23:26 +0200)]
drawcontext: Only pass the region that matters
We used to pass 2 regions to GdkDrawCotnext.end_frame() but code was
confusing what they meant. So we now don't do that anymore and only pass
the region that matters: The frame region.
Benjamin Otte [Mon, 23 Apr 2018 16:24:29 +0000 (18:24 +0200)]
drawcontext: Add gdk_draw_context_in_frame() API
This makes the previous gdk_draw_context_is_drawing() function public
under a new name.
I decided against the old name because we use the term "frame" for a
drawing operation, so I wanted to have this boolean flag reuse the term.
Benjamin Otte [Mon, 23 Apr 2018 16:17:29 +0000 (18:17 +0200)]
drawcontext: Move variable into private struct
... and get rid of duplicate variable in the process.
Benjamin Otte [Mon, 23 Apr 2018 15:28:55 +0000 (17:28 +0200)]
gdk: Move begin/end_frame() functions
As they require a draw context and the draw context is already bound to
the surface, it makes much more sense and reduces abiguity by moving
these APIs to the draw context.
As a side effect, we simplify GdkSurface APIs to a point where
GdkSurface now does not concern itself with drawing anymore at all,
apart from being the object that creates draw contexts.
Benjamin Otte [Fri, 20 Apr 2018 23:22:19 +0000 (01:22 +0200)]
gdk: Get rid of GdkDrawingContext
All information is kept in GdkDrawContext these days, so use that one.
Benjamin Otte [Fri, 20 Apr 2018 22:58:53 +0000 (00:58 +0200)]
gdk: Get rid of gdk_drawing_context_get_clip()
Use the identical gdk_draw_context_get_frame_region() instead.
Benjamin Otte [Fri, 20 Apr 2018 22:47:35 +0000 (00:47 +0200)]
gdk: Add gdk_draw_context_get_frame_region()
This does the same as gdk_drawing_context_get_clip().
Benjamin Otte [Fri, 20 Apr 2018 15:04:36 +0000 (17:04 +0200)]
gdk: Remove gdk_gl_context_get_damage()
Remove it only form public API, because we still use the vfunc to figure
out the damage area in begin_frame().
Benjamin Otte [Fri, 20 Apr 2018 14:07:34 +0000 (16:07 +0200)]
gsk: Refactor damage computation for GL renderer
Previously, we got the damage, then computed the changed area, then
started a frame with that changed area.
But starting a frame computes the damage for us.
So now we start a frame, then get the damage area from that, then
compute the change area.
Benjamin Otte [Tue, 17 Apr 2018 21:05:41 +0000 (23:05 +0200)]
wayland: Rewrite Cairo rendering
Also, split it into its own file - which was the original reason for
looking at this code, the rewrite was an unintentional side effect.
This changes the context to create surfaces on demand.
So whenever the compositor holds onto a surface while GDK wants to
render, it just creates a new surface. If the compositor releases
surfaces, we will retain one for the next frame to be rendered, but free
all extra ones.
This way, we should get to a stage where we have exactly as many
surfaces as needed and never allocate/free any.
Benjamin Otte [Sat, 14 Apr 2018 00:29:23 +0000 (02:29 +0200)]
x11: Move implementation of Cairo context backends
Also, don't implement SurfaceClass.ref_cairo_surface() anymore. This
means calls to it will crash now. But as they only happen in the generic
GdkCairoContext implementation, we shouldn't be affected by that.
Plus, once all backends have been ported, that call is going away
anyway.
Benjamin Otte [Sun, 15 Apr 2018 16:42:23 +0000 (18:42 +0200)]
surface: Merge function into only caller
Benjamin Otte [Sat, 14 Apr 2018 20:45:33 +0000 (22:45 +0200)]
gdk: Remove GDK_DEBUG=cairo-image
This is the default now - at least until cairo rendering gets split
into backends.
Benjamin Otte [Sat, 14 Apr 2018 20:35:46 +0000 (22:35 +0200)]
surface: Fold function into only user
Benjamin Otte [Sat, 14 Apr 2018 00:17:47 +0000 (02:17 +0200)]
cairocontext: Turn cairo_create() function into a vfunc
Benjamin Otte [Sat, 14 Apr 2018 00:10:36 +0000 (02:10 +0200)]
gdk: Remove unused GL setting
Benjamin Otte [Thu, 12 Apr 2018 14:48:31 +0000 (16:48 +0200)]
gdk: Add Cairo context implementations for all backends
And make the GdkCairoContext as abstract.
The idea of this and thje following commits is to get rid of all
Cairo code in gdksurface.c (and $backend/gdksurface-$backend.c)
by moving that code into the Cairo context files.
In particular, the GdkSurfaceClass.begin_frame/end_frame()
functions (which are currently exclusively used by the Cairo code
should end up being moved to GdkDrawContextClass.begin/end_frame().
This has multiple benefits:
1. It unifies code between the different drawing contexts.
GL lives in GLContext, Vulkan in VulkanContext and Cairo in
CairoContext. In turn, this makes it way easier to reason about
what's going on in surface-specific code. Currently pretty much
all backends do things wrong when they want to sync to drawing
or to the frame clock.
2. It makes the API of GdkSurface smaller. No drawing code (apart
from creating the contexts) needs to remain.
3. It confines Cairo to the Drawcontext, thereby making it way
more obvious when backends are still using it in situations
where it may now conflict with OpenGL (like when doing the dnd
failed animation or in the APIs that I'm removing in this
branch).
4. We have 2 very different types of Cairo contexts: The X/win32
model, where we have a natively supported Cairo backend but do
double buffering ourselves and use similar surfaces and the
Wayland/Broadway model where we use image surfaces without any
Cairo backend support and have to submit the buffers manually.
By not sharing code between those 2 versions, we can make the
actual code way smaller. We also get around the need to create
1x1 image surfaces in the Wayland backend where we pretend
there's a native Cairo surface.
Benjamin Otte [Thu, 12 Apr 2018 00:10:22 +0000 (02:10 +0200)]
cairocontext: Move a function
A function of GdkDrawingContext is only used when drawing with Cairo, so
move it to GdkCairoContext.
Benjamin Otte [Wed, 11 Apr 2018 22:32:53 +0000 (00:32 +0200)]
gdk: Move Cairo code from surface to CairoContext
This just moves code, no actual changes to functionality are happening.
Benjamin Otte [Wed, 11 Apr 2018 22:16:43 +0000 (00:16 +0200)]
gdk: Add GdkCairoContext
This does nothing but disallow passing NULL to gdk_surface_begin_paint()
and instead require this context.
The ultimate goal is to split out Cairo drawing into its own source file
so it doesn't clutter up the generic rendering path.
Benjamin Otte [Tue, 24 Apr 2018 19:32:36 +0000 (21:32 +0200)]
gtk-demo: Merge widgetbowl into fishbowl
Benjamin Otte [Tue, 24 Apr 2018 18:32:57 +0000 (20:32 +0200)]
demo: Clean up GtkFishbowl widget
1. Remove set_icons property
2. Make it a GtkWidget subclass
3. Add gtk_fishbowl_set_creation_func()
4. Make the widgetbowl use the new benchmarking infrastructure of the
fishbowl
Benjamin Otte [Tue, 24 Apr 2018 17:04:44 +0000 (19:04 +0200)]
demo: Move benchmarking implementation to fishbowl widget
Kristjan SCHMIDT [Tue, 24 Apr 2018 19:17:30 +0000 (19:17 +0000)]
Update Esperanto translation
Daniel Boles [Tue, 24 Apr 2018 12:40:02 +0000 (13:40 +0100)]
testentrycompletion: Use the model we already got
cherry-pick of gtk-3-22 commit
af350b20b1c396ec55ca6a71eab23fdca6ffb784
Stas Solovey [Tue, 24 Apr 2018 10:32:36 +0000 (10:32 +0000)]
Update Russian translation
Benjamin Otte [Tue, 24 Apr 2018 02:02:55 +0000 (04:02 +0200)]
snapshot: Get rid of record_nodes flag
Instead, use GTK_DEBUG=snapshot for it.
Benjamin Otte [Tue, 24 Apr 2018 01:46:44 +0000 (03:46 +0200)]
rendernode: Remove gsk_render_node_set_name()
And of course, gsk_render_node_get_name() is gone, too.
The replacement is of course debug nodes.
As a side effect, GskRenderNode is now *really* immutable.
Benjamin Otte [Tue, 24 Apr 2018 01:17:23 +0000 (03:17 +0200)]
snapshot: Redo debug messages
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
Benjamin Otte [Mon, 23 Apr 2018 22:41:48 +0000 (00:41 +0200)]
gsk: Add GskDebugNode
Matthias Clasen [Tue, 24 Apr 2018 00:38:20 +0000 (00:38 +0000)]
Merge branch 'wip/matthiasc/emoji-picker' into 'master'
Wip/matthiasc/emoji picker
See merge request GNOME/gtk!115
Matthias Clasen [Mon, 23 Apr 2018 04:29:21 +0000 (00:29 -0400)]
Drop Ctrl-Shift-e support
Now that we have Emoji completion, drop the rather limited
Ctrl-Shift-e support in GtkIMContextSimple, and leave this
sequence to input methods.
Matthias Clasen [Tue, 15 Aug 2017 21:35:03 +0000 (17:35 -0400)]
widget-factory: add emoji completion to an entry