Commit Graph

57675 Commits

Author SHA1 Message Date
Matthias Clasen
e1200230c4 widget-factory: Add some nested popovers
These are mainly for stress-testing our
popover implementations.
2019-04-27 17:50:22 +00:00
Matthias Clasen
d3ad816d63 widget-factory: Add non-modal popovers
This makes is easy to test moving the toplevel
or repositioning the parent while the popover
is shown.
2019-04-27 17:50:14 +00:00
Matthias Clasen
eea1388cf4 file chooser: Fix Ctrl-L
We were forwarding key events to the search entry
and unconditionally considered search started
afterwards. That is not correct, since things
like a Ctrl key press should not trigger search.
Fix this by only switching to search mode when
the event was actually consumed.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1829
2019-04-27 17:43:59 +00:00
Matthias Clasen
f3747d1776 Merge branch 'font-chooser-search' into 'master'
fontchooser: Fix type-to-search

Closes #1842

See merge request GNOME/gtk!780
2019-04-27 16:08:53 +00:00
Matthias Clasen
6277f2fccc fontchooser: Fix type-to-search
The key capture was interfering with other
entries in the dialog, so be smarter about
when we want to capture keys and when we
don't.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1842
2019-04-27 15:59:45 +00:00
Timm Bäder
931b0b3752 gl renderer: Move texture labeling below initialization
Apparently genTextures and friends only "reserves names", initializing
them will actually create them. Using glObjectLabel on textures before
initializing them will throw a GL_INVALID_VALUE error.
2019-04-27 10:44:37 +02:00
Timm Bäder
6f3e608331 gdkglcontext: Limit gl debug label length
There's a maximum length we have to adhere to, otherwise GL throws a
GL_INVALID_VALUE error.
2019-04-27 10:44:23 +02:00
Timm Bäder
cc4b3798e5 searchentry: Always measure and allocate icon
Just measuring it (so the warning goes away) but then not using the
values will later underallocate the text widget.
Instead, always reserve space for the icon (which will inevitable be
visible as soon as the searchentry is actually being used).

Fixes #1831
2019-04-27 08:40:33 +02:00
Timm Bäder
8634a51aa5 Adwaita: separate '.view text' from textview>text
The first rule breaks GtkText inside GtkSearchEntry inside something
that has .view applied, as found in the file chooser when searching.
2019-04-27 08:40:33 +02:00
Benjamin Otte
7420f9c34a testsuite: Rewrite text diff to use GSubprocess
... instead of g_spawn(). Avoids having to create a temp file, too.
2019-04-27 06:20:30 +02:00
Timm Bäder
1a7c280ebb gl renderer: bind the texture framebuffer before rendering
When rendering to a texture, collecting the render ops might bind a
different framebuffer, so bind the one we want again before doing the
actual rendering.
2019-04-26 18:05:32 +02:00
Timm Bäder
4bb6e70d01 tooltip: Initialize tooltip coords to given event coords
Otherwise the coordinates passed to the query-tooltip signal are always
0.
2019-04-26 18:05:32 +02:00
Matthias Clasen
2bd9b42479 Merge branch 'wip/surface-transform-data' into 'master'
Surface transform listener fixes

See merge request GNOME/gtk!776
2019-04-25 16:42:42 +00:00
Chun-wei Fan
b8127670df Merge branch 'fix-gdkwin32-move-drag' into 'master'
gdksurface-win32.c: Acquire root coordinates on drag/move

See merge request GNOME/gtk!693
2019-04-25 15:44:59 +00:00
Jonas Ådahl
3a1ef7aa2c widget: Move surface relative transform fields into its own struct
The purpose being to reduce the size of GtkWidgetPrivate. What is left
is a pointer to the allocated struct.
2019-04-25 16:02:19 +02:00
Daniel Mustieles
8dd26b6b8a Updated Spanish translation 2019-04-25 15:58:58 +02:00
Matthias Clasen
0526775ff4 Merge branch 'wip/alexl/gl-debug' into 'master'
Add GL debugging integration

See merge request GNOME/gtk!771
2019-04-25 13:16:09 +00:00
Jonas Ådahl
1ad406e15d widget: Remove leftover parent-changed handler removal
It was never added, as the listener was replaced by explicit code in
gtk_widget_(un)root(), but the removal code was left in place in error.
2019-04-25 14:29:19 +02:00
Alexander Larsson
249f6a85b3 gdkglcontext: Only emit opengl debug calls if GDK_DEBUG=gl-debug
This avoids a potential performance cost in the non-debug case.
2019-04-25 11:36:23 +02:00
Alexander Larsson
32edf29c0a GskGLRenderer: Add debug groups
This adds debug groups in various places, including the debug
nodes if those are in use. This makes the traces in tools like
renderdoc much easier to read.
2019-04-25 11:36:21 +02:00
Alexander Larsson
4f7171885f GskGLRenderer: Label various gl objects
This means the names are more useful in tools like renderdoc.
2019-04-25 11:35:00 +02:00
Alexander Larsson
b1eedbeb58 GdkGLContext: Add internal functions for KHR_DEBUG calls
This includes pushing and poping debug group messages and labeling
objects.
2019-04-25 11:35:00 +02:00
Matthias Clasen
a98f857a82 Merge branch 'parent-surface' into 'master'
Drop the parent surface getter and setter

See merge request GNOME/gtk!774
2019-04-25 01:18:54 +00:00
Matthias Clasen
b9770fa752 widget: Drop gtk_widget_set_parent_surface
And the getter, too. Widgets no longer have
extra surfaces that could serve as parent surfaces.
2019-04-24 20:57:09 -04:00
Matthias Clasen
52d4bcf1be popover: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
2019-04-24 20:57:09 -04:00
Matthias Clasen
fe3b5ba545 tests: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
2019-04-24 20:57:09 -04:00
Matthias Clasen
33f034d0d7 a11y: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
2019-04-24 20:54:05 -04:00
Matthias Clasen
2516f1142d Merge branch 'wip/widget-position-changed-callbacks' into 'master'
widget: Add surface relative position changed callback

See merge request GNOME/gtk!760
2019-04-24 19:26:27 +00:00
Matthias Clasen
ec37e1e462 Merge branch 'fix-and-improve-linked-button-style' into 'master'
themes: Fix and improve linked button style

Closes #1294

See merge request GNOME/gtk!730
2019-04-24 19:23:12 +00:00
Matthias Clasen
79180f62d7 Merge branch 'wip/jimmac/type-experiments' into 'master'
Adwaita: generic type styles

See merge request GNOME/gtk!772
2019-04-24 19:08:40 +00:00
Jakub Steiner
5cd4ec510d Adwaita: generic type styles
- try to define a basic typographic structure

See https://gitlab.gnome.org/GNOME/gtk/issues/1808
2019-04-24 19:23:05 +02:00
Matthias Clasen
ea95aea246 Merge branch 'csserror-g-decls' into 'master'
csserror: Add G_BEGIN_DECLS and G_END_DECLS

See merge request GNOME/gtk!773
2019-04-24 16:56:40 +00:00
Timm Bäder
e13d242320 gl renderer: Keep op builder around
GL keeps the unoform state per-program, but not per-frame. So, we can't
pretend that this works for us. Keep the RenderOpBuilder around for the
entire lifetime of the renderer instead.
2019-04-24 17:55:14 +02:00
Kjell Ahlstedt
c21063e71e csserror: Add G_BEGIN_DECLS and G_END_DECLS
Necessary when the header file is included in C++ code.

Merge request !773
2019-04-24 16:32:54 +02:00
Jonas Ådahl
477ad2505b widget: Add surface relative transform changed callback
Added two new private GtkWidget API:

 * gtk_widget_add_surface_transform_changed_callback()
 * gtk_widget_remove_surface_transform_changed_callback()

The intention is to let the user know when a widget transform relative
to the surface changes. It works by calculating the surface relative
transform during allocation, and notifying the callbacks if it changed
since last time. Each widget adds itself as a listener to its parent
widget, thus will be triggered if a parents surface relative transform
changes.
2019-04-24 14:26:24 +02:00
Timm Bäder
91bbe6ef95 gl renderer: Sync gpu and cpu default alpha value
Otherwise we might end up not passing the new value to the GPU.
2019-04-24 13:29:45 +02:00
Timm Bäder
34fcfb154a gl renderer: Properly apply opacity in cross-fade shader 2019-04-24 13:29:45 +02:00
Daniel Mustieles
28815bc7e4 Updated Spanish translation 2019-04-24 09:52:46 +02:00
Matthias Clasen
8eaa8aaaf8 Merge branch 'simplify-fixes' into 'master'
Simplify fixes

See merge request GNOME/gtk!770
2019-04-23 21:39:29 +00:00
Matthias Clasen
491829a2b5 builder-tool: Check canonical names
Always canonicalize names before comparing.
We were missing properties like left_attach,
since we were comparing them to left-attach.
2019-04-23 17:30:00 -04:00
Matthias Clasen
28be1c5d3a builder-tool: Fix property check
Embarrassingly, there was a missing else
causing us to check all packing properties
as object properties, never finding them.
2019-04-23 21:25:59 +00:00
Timm Bäder
65ff19d149 eventcontrollermotion: Document missing signal parameters 2019-04-23 17:24:51 +02:00
Timm Bäder
3da6e83609 cssprovider: Fix a parameter name mismatch 2019-04-23 17:24:07 +02:00
Benjamin Otte
2a7e4ae7f6 testsuite: Don't pretend we're a GTest
This is a meson test, not a GTest thing. So:

- Use g_print(), not g_test_message
That makes meson test --verbose print the actual log messsages.

- Don't g_assert() all the time
Instead, run tests through to the end and just return a non-0 exit
status.
2019-04-23 17:09:14 +02:00
Timm Bäder
cc878ec00f gl renderer: begin/end_frame around do_render
This fixes rendering to a texture on intel hardware. The glClear calls
would throw a GL_FRAMEBUFFER_INCOMPLETE error here, because the
gsk_gl_driver_begin_frame() call in do_render() reset the framebuffer
object in use.
2019-04-23 17:09:14 +02:00
Timm Bäder
1f5649e1ce GdkWaylandDevice: Don't recreate the default cursor every frame
Save the information whether the cursor in use is the default one, and
don't create a new cursor object in that case.
We previously created a new cursor object every frame just to compare it
to the current cursor in use and then throw it away.
2019-04-23 17:09:14 +02:00
Daniel Mustieles
ca19b940ce Updated Spanish translation 2019-04-23 10:30:35 +02:00
Daniel Mustieles
3f70d20bb3 Updated Spanish translation 2019-04-23 10:29:32 +02:00
Matthias Clasen
304e06541e Merge branch 'forgotten-file' into 'master'
window: Remove dropped api from headers

See merge request GNOME/gtk!769
2019-04-23 01:37:39 +00:00
Matthias Clasen
c91371951a window: Remove dropped api from headers
This was forgotten in fed2db1493.
2019-04-23 01:23:01 +00:00