summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Flip glarea backflip-glareaMatthias Clasen2020-09-274-4/+31
| | | | | Textures that are backed by an fbo need to be read out upside down. OpenGL, you are amazing.
* Updated Lithuanian translationAurimas Černius2020-09-271-3406/+3291
|
* Merge branch 'patch-1' into 'master'Matthias Clasen2020-09-271-1/+1
|\ | | | | | | | | treestore: Document the fact that iter is modified by the function, in a machine-readable fashion. See merge request GNOME/gtk!2613
| * Update gtktreestore.c: gtk_tree_store_remove didn't have the proper comment ↵Danny Milosavljevic2020-09-271-1/+1
| | | | | | | | | | | | | | | | annotation "inout" for the parameter ITER passed. This means that bindings would misjudge what the function does. In the case of guile-gi, it would be misjudged for a predicate, see gulie-gi bug 87.
* | Merge branch 'issue2627-gtk4' into 'master'Matthias Clasen2020-09-277-273/+47
|\ \ | | | | | | | | | | | | gdk/wayland: Replace gtk-primary-selection with primary-selection-unstable-v1 See merge request GNOME/gtk!2630
| * | gdk/wayland: Replace gtk-primary-selection with primary-selection-unstable-v1Robert Mader2020-09-277-273/+47
| |/ | | | | | | | | | | The later is the public upstream version, while identical implementation wise. https://gitlab.gnome.org/GNOME/gtk/-/issues/2591
* | Merge branch 'avoid-gl-texture-download' into 'master'Matthias Clasen2020-09-271-6/+8
|\ \ | | | | | | | | | | | | gsk: Avoid downloading GL textures when possible See merge request GNOME/gtk!2628
| * | gsk: Avoid downloading GL textures when possibleavoid-gl-texture-downloadMatthias Clasen2020-09-261-6/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | I found that the gears demo was spending 40% cpu downloading a GL texture every frame, only to upload it again to another context. While the GSK rendering and the GtkGLArea use different GL contexts, they are (usually) connected by sharing data with the same global context, so we can just use the texture without the download/upload dance. This brings gears down to < 10% cpu.
* | Merge branch 'fontchooser-no-lang' into 'master'Matthias Clasen2020-09-272-4/+26
|\ \ | |/ |/| | | | | fontchooser: Fix builds without PangoFT2 See merge request GNOME/gtk!2629
| * fontchooser: Fix builds without PangoFT2fontchooser-no-langMatthias Clasen2020-09-262-4/+26
|/ | | | | | | | | | | Currently, only if PangoFT2 is present and used it is supported to retrieve the languages that are supported by a particular font. If we don't have PangoFT2, remove the language filtering and the sample text selection. Based on earlier work by Chun-wei Fan, see https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2614
* Merge branch 'BUG_gtktreeview_headers_focus_on_click_GTK4' into 'master'Matthias Clasen2020-09-261-0/+1
|\ | | | | | | | | GtkTreeviewColumn: don't focus-on-click header buttons See merge request GNOME/gtk!1806
| * GtkTreeviewColumn: don't focus-on-click header buttonsBUG_gtktreeview_headers_focus_on_click_GTK4Nelson Benítez León2020-04-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | currently when mouse clicking on a column header to sort it it is grabbing keyboard focus, this should not happen, keyboard focus should remain where it was before. This can be seen on the GtkFileChooser widget, when having the keyboard focus on the file list items and clicking on a column header to sort it the keyboard focus is now on the header.
* | testupload: Test more formatsMatthias Clasen2020-09-261-219/+341
| | | | | | | | | | | | | | | | | | | | Copy the format conversion code from GdkMemoryTexture so we can produce all formats, and test them all. The upload fast paths assume that the stride is a multiple of four, so some of the padding values cause it to fail. Apart from that, things seem to work for all combinations.
* | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2020-09-263-0/+291
|\ \ | | | | | | | | | | | | Matthiasc/for master See merge request GNOME/gtk!2626
| * | Add a test for various texture uploadsMatthias Clasen2020-09-262-0/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create textures with various characteristics (alpha, premultiplication, stride) that trigger different code paths in the gl texture upload function, and show the resulting images. If all goes well, they all should look the same. On my system, this tests texture upload for memory formats GDK_MEMORY_B8G8R8A8_PREMULTIPLIED, GDK_MEMORY_R8G8B8A8, and GDK_MEMORY_R8G8B8, and it works with both gl and gles.
| * | NEWS: UpdatesMatthias Clasen2020-09-261-0/+13
|/ /
* | Merge branch 'fix-texture-upload-more' into 'master'Matthias Clasen2020-09-261-2/+0
|\ \ | | | | | | | | | | | | | | | | | | More texture upload fixes Closes #3198 See merge request GNOME/gtk!2624
| * | More texture upload fixesfix-texture-upload-moreMatthias Clasen2020-09-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | In some cases, with bpp == 3 and a rowstride that is divisible by 4, we were passing invalid parameters to GL. Fixes: #3198
* | | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2020-09-262-1/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | gl: Make debug spew more complete Closes #3197 See merge request GNOME/gtk!2623
| * | popup: Fix up a doc blurbMatthias Clasen2020-09-251-1/+1
| | | | | | | | | | | | | | | | | | The GdkPopup:autohide property was mis-documented. Fixes: #3197
| * | gl: Make debug spew more completeMatthias Clasen2020-09-251-0/+2
| | | | | | | | | | | | | | | List GL_EXT_unpack_subimage among the extensions we check for.
* | | Merge branch 'add-child-clash' into 'master'Matthias Clasen2020-09-2618-123/+124
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Make GtkBuildable vfunc accessor functions private Closes #3191 See merge request GNOME/gtk!2619
| * | docs: Document GtkBuildable changes in migration guideFlorian Müllner2020-09-261-0/+7
| | | | | | | | | | | | https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
| * | buildable: Make vfunc accessor functions privateFlorian Müllner2020-09-268-56/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the exception of gtk_buildable_get_id(), those are only used to construct objects from XML descriptions, which is functionality internal to GTK. The API is therefore unlikely to be missed, and keeping it internal means they can no longer unintentionally shadow object methods in bindings with less namespacing; for example it's currently ambiguous whether `infoBar.add_child()` refers to gtk_info_bar_add_child() or gtk_buildable_add_child(). https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
| * | buildable: Rename set_name() to set_buildable_id()Florian Müllner2020-09-2613-70/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | GtkBuildable's get_name()/set_name() methods may shadow GtkWidget's methods. Avoid that by renaming the API to get_buildable_id()/set_buildable_id(), which also reflects the name of the XML attribute the API refers to. https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
* | | Merge branch 'fix-rgb-upload' into 'master'Matthias Clasen2020-09-261-0/+4
|\ \ \ | |/ / |/| | | | | | | | | | | | | | gl: Fix RGB uploads Closes #3194 See merge request GNOME/gtk!2620
| * | gl: Reset GL_UNPACK_ALIGNMENTfix-rgb-uploadMatthias Clasen2020-09-251-0/+2
| | | | | | | | | | | | | | | Reset GL_UNPACK_ALIGNMENT to its initial value of 4 after changing it for a glTexImage2D call.
| * | gl: Fix RGB uploadsMatthias Clasen2020-09-251-0/+2
| | | | | | | | | | | | | | | | | | | | | I don't really know what to say, other than: OpenGL is terrible Fixes: #3194
* | | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2020-09-255-29/+8
|\ \ \ | | | | | | | | | | | | | | | | columnview: Simplify column constructors See merge request GNOME/gtk!2622
| * | | columnview: Simplify column constructorsMatthias Clasen2020-09-255-29/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Drop gtk_column_view_column_new_with_factory and just make gtk_column_view_column_new accept a nullable factory. This follows what we've been doing elsewhere. Update all callers.
* | | Merge branch 'wip/carlosg/for-master' into 'master'Matthias Clasen2020-09-256-124/+8
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Wip/carlosg/for master Closes #3125 and #3121 See merge request GNOME/gtk!2621
| * | gtkbutton: Clean up priv->in_buttonCarlos Garnacho2020-09-251-21/+0
| | | | | | | | | | | | This is now only toggled around, may be cleaned up.
| * | gtkbutton: Check release coordinates on all release event typesCarlos Garnacho2020-09-251-25/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The priv->in_button state that used to be relied upon for pointer events has been reduced over time to a broken state, since the button does not track crossing events anymore. Make the coordinate-based checks apply for pointer events too, besides touch events. This fixes GtkButton mistakenly emitting ::clicked with pointer button releases outside the widget. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3121
| * | gtktextview: Avoid GtkGestureClick claiming on touch pressCarlos Garnacho2020-09-251-2/+0
| | | | | | | | | | | | | | | We still want the drag gesture (and text selection) to work. Avoid claiming the gesture early, like it's done in the pointer case.
| * | gtkscrolledwindow: Do not eagerly claim touch press eventCarlos Garnacho2020-09-251-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Claiming early makes the contents unable to react to the touch press event. Do this on GtkGestureDrag::update past a threshold, so the child widget(s) can claim before the scrolledwindow does. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3125
| * | gtkscrolledwindow: Drop gtk_scrolled_window_set_capture_button_press()Carlos Garnacho2020-09-254-71/+1
|/ / | | | | | | | | | | This API is kinda stuck in the GdkEvent days, we now negotiate ownership of the input sequence via GtkGestures. Remove it as it reflects a way to work that was not exactly accurate and it will turn plainly wrong soon.
* | Merge branch 'gles-texture-colors' into 'master'Matthias Clasen2020-09-2516-185/+255
|\ \ | | | | | | | | | | | | Fix uploads of textures in GLES (and make texture uploads better) See merge request GNOME/gtk!2616
| * | Drop gdk_cairo_surface_upload_to_gl() helperAlexander Larsson2020-09-253-57/+0
| | | | | | | | | | | | | | | | | | There is nothing really special about this code, its just a helper for uploading pixel data to opengl, and we're not really in the business of doing opengl-specific helper functions.
| * | gl backend: Avoid roundtripping via surface when updloadingAlexander Larsson2020-09-255-42/+86
| | | | | | | | | | | | | | | | | | Do custom uploads rather than using gdk_cairo_surface_upload_to_gl(), because this way we avoids a roundtrip (memcpy and possibly conversion) to the cairo image surface format.
| * | gdk_gl_context_upload_texture() avoid conversion for pixbuf formatAlexander Larsson2020-09-251-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | The gdk-pixbuf non-rgba format can be directly uploaded without conversion. The rgba format needs alpha premultiplication though, which is not supported by GL during upload.
| * | Correctly upload textures for GLESAlexander Larsson2020-09-255-50/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLES doesn't support the GL_BGRA + GL_UNSIGNED_INT_24_8 hack that we use on desktop OpenGL to upload textures directly in the cairo pixel format. This adds the required conversions to all the places that currently need it. We also add a data_format to the internal gdk_gl_context_upload_texture() function to make it clearer what the format are. Currently it is always the cairo image surface format, but eventually we want to support other formats so that we can avoid some of the unnecessary conversions we do. Also, the current gdk_gl_context_upload_texture() code always converts to a cairo format and uploads that like we did before. Later commits will allow this to use other upload formats that gl supports to avoid conversions.
| * | Add GDK_MEMORY_R8G8B8A8_PREMULTIPLIEDAlexander Larsson2020-09-253-10/+23
| | | | | | | | | | | | | | | | | | | | | This is the default OpenGL format, and in fact the only pixel format that GLES supports uploading as. Actually, the premultiplied part is really just about how we use the textures, but all textures in GTK are premultiplied.
| * | texture: Unvirtualize download_surfaceAlexander Larsson2020-09-252-25/+17
| | | | | | | | | | | | We only have one implementation, so why do all this vfunc work?
* | | Merge branch 'wip/baedert/for-master' into 'master'Timm Bäder2020-09-258-72/+108
|\ \ \ | | | | | | | | | | | | | | | | Wip/baedert/for master See merge request GNOME/gtk!2617
| * | | cssimagefallback: WhitespaceTimm Bäder2020-09-241-4/+4
| | | |
| * | | cssimagefallback: Avoid allocating GPtrArray for colorsTimm Bäder2020-09-241-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | If we just parse a color, like image(#FFF), avoid allocating the GPtrArray to store images. This happens in Adwaita for background images of backdrop buttons. We save around 70 GPtrArrays this way.
| * | | Adwaita: Fix calendar header button backdrop bg colorTimm Bäder2020-09-241-0/+3
| | | |
| * | | gl renderer: Lower maximum gradient stop countTimm Bäder2020-09-243-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 6 is still plenty according to my market research. Should help with #2624
| * | | gl renderer: Fall back to cairo if gradients use too many stopsTimm Bäder2020-09-243-37/+53
| | | |
| * | | textbuffer: Don't try to inset NULL text from clipboardTimm Bäder2020-09-241-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | That used to generate a critical error message. Also free() the data.