Olivier Fourdan
2324b96a32
wayland: check valid pending cairo surface
...
gdk_wayland_window_attach_image() is normally called from
gdk_window_end_paint() to notify the compositor of newly staged drawing.
If any of the drawing code inadvertently dispatches the wayland event
loop (for instance with a gdk_flush() call), then it's possible that by
the time gdk_window_end_paint() is called, the staged drawing is already
destroyed.
This commit bypasses the attach_image call in scenarios where the staged
drawing is prematurely dropped.
https://bugzilla.gnome.org/show_bug.cgi?id=773274
2016-11-03 08:50:34 +01:00
Benjamin Otte
c9a313a125
revealer: Port to no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
acd801000c
textview: Convert to no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
6c3d1fba78
iconview: Turn into no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
7e9796568d
colorplane: Port to be a no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
0508526658
colorswatch: Readd accidentally removed call
2016-11-03 01:15:08 +01:00
Benjamin Otte
d818f3fcd4
viewport: Turn into no-window widget
...
While doing so, get rid of the GdkWindow instead of keeping it.
2016-11-02 22:00:29 +01:00
Benjamin Otte
bb8b24da47
menu: Don't set widget->window
...
Instead, create an input window for the menubar and omit the window for
the menu itself.
2016-11-02 22:00:29 +01:00
Timm Bäder
633a93f418
widget: Remove outdated comment
...
gtk_widget_override_color is no more.
2016-11-02 18:40:00 +01:00
Timm Bäder
a7efe10ef8
widget: Remove unused visibility-notify-event
2016-11-02 18:40:00 +01:00
Timm Bäder
773c16076b
widget: Remove state-flags leftovers
2016-11-02 18:40:00 +01:00
Benjamin Otte
6dddf0447e
css: Fix radial-gradient() color stop computation
...
The copy/paste from the linear gradient code had an error.
2016-11-02 15:19:49 +01:00
Chun-wei Fan
2d7df8e66a
gdk/win32: Complete gdk_screen_is_composited() removal
...
Commit d249e77
(API: screen: Remove gdk_screen_is_composited()) attempted
to update the GDK-Win32 for the removal of the API, but some parts were
missed. This updates the code so that things continue to build and run.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-02 15:37:10 +08:00
Chun-wei Fan
b9f9980bb4
gsk: Export gsk_render_node_get_bounds()
...
gtk/inspector/rendernodeview.c calls this private function from GSK, so we
need to ensure that this function is exported so that GTK+ can link
properly on compilers that do not support automatic exporting.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-02 15:26:02 +08:00
Benjamin Otte
32a5729d18
gtk: Chain up in realize()
...
... instead of copy/paste from gtk_widget_real_realize.
2016-11-02 07:16:08 +01:00
Benjamin Otte
b0a5e8764c
widget: Insist on widgets calling gtk_widget_set_has_window()
...
This way, we can grep the code for the bad widgets that set this to
TRUE and fix them.
2016-11-02 06:54:57 +01:00
Benjamin Otte
5e07a31d2b
gtk: Call gtk_widget_set_has_window() on every widget
...
Even if we just set it to the value it already had.
2016-11-02 06:54:57 +01:00
Benjamin Otte
8ea1157d38
treeview: Don't use gtk_widget_get_allocaton()
...
Use gtk_widget_get_allocated_width()/height() instead.
2016-11-02 06:54:57 +01:00
Chun-wei Fan
21b061b0dd
demos/application: Call the right program
...
We need to update the call to gtk4-application-demo, plus include the
correct icon file for this.
2016-11-02 12:23:41 +08:00
Matthias Clasen
2d14217cd7
inspector: Cosmetic improvements to the recorder
2016-11-01 22:06:25 -04:00
Juan Pablo Ugarte
c607d51890
Use GLSL version 110 for OpenGL 2 shaders.
...
According to docs and Intel legacy drivers,
GLSL version 130 is for GL 3.0 not GL 2.0/2.1
Validated files with reference compiler from
https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
2016-11-01 15:42:46 -03:00
Matthias Clasen
793f843b08
check button: Update for new box gadget functionality
...
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
18f321df94
expander: Update for new box gadget functionality
...
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
953c7ba6be
box gadget: Implement get_render_node vfunc
...
This implements get_render_node in the obvious way.
2016-11-01 14:29:25 -04:00
Matthias Clasen
68cc1412e5
container: Add a private api for render node propagation
...
Add a function that propagates a render node for a single
child. This will be used in the box gadget to handle widgets.
2016-11-01 14:29:25 -04:00
Matthias Clasen
30a56acc7d
gadget: Add a get_render_node vfunc
...
This will let us do box gadgets like we do containers.
2016-11-01 14:29:25 -04:00
Matthias Clasen
3656c9f94c
Convert GtkEntry to indirect rendering
...
Warning! This unveils some positioning issue with the secondary icon.
2016-11-01 14:29:25 -04:00
Matthias Clasen
6ed58cfd50
Fix the build
...
testgtk.c had some dead code referring to GdkColor. Drop it.
2016-11-01 14:11:25 -04:00
Matthias Clasen
7a2537866b
Drop GdkColor
...
It is deprecated and no longer used.
2016-11-01 13:58:11 -04:00
Matthias Clasen
35209f098b
Stop supporting GdkColor in text buffer serialization
...
GdkColor is going away soon.
2016-11-01 13:58:10 -04:00
Matthias Clasen
17a061b8da
Drop the settings color parser
...
We have no color-valued settings anymore.
2016-11-01 13:58:10 -04:00
Matthias Clasen
6e178aede2
Use GdkRGBA for text attributes
...
Now that GtkTextAttributes is private, we can clean this struct
up a bit. The first step is to switch from GdkColor to GdkRGBA,
and adapt all users.
2016-11-01 13:58:10 -04:00
Matthias Clasen
e6d5a3dce2
Drop GtkTextAttributes from the docs
2016-11-01 13:58:10 -04:00
Matthias Clasen
745c348ff8
Make GtkTextAttributes private
...
This is a problematic struct, and giving direct access to it
has kept us from making improvements to GtkTextView. Drop it
from the public API, together with the auxiliary APIs. If
it turns out that this functionality is needed, we should add
individual getters.
2016-11-01 13:58:10 -04:00
Benjamin Otte
72a9c53262
inspector: Add a button to clear all recordings
...
Clears the recordings list, and even better: Frees all your memory.
2016-11-01 18:34:40 +01:00
Benjamin Otte
e02ff7c064
inspector: Collect statistics for unclassable types
...
I want to know how many GskRenderNodes I have!
2016-11-01 18:34:40 +01:00
Benjamin Otte
3741e6906e
inspector: Require toggling on/off of recording
...
This way, we don't eat up all your memory every time you start the
inspector.
2016-11-01 18:34:40 +01:00
Benjamin Otte
4673318028
inspector: Add list of render nodes to recorder
...
And make it possible to view the actually selected node in the view.
2016-11-01 18:34:40 +01:00
Benjamin Otte
4265c0e5b0
inspector: Next step in the recorder view
...
We now record all render operations and display them.
Warning: This is very brute force, you can't clear the recordings or
turn recording off. And this thing easily records 25MB per recorded
frame, so be careful to not run out of memory and get your browser
killed. ;)
2016-11-01 18:34:40 +01:00
Benjamin Otte
e6f711a94a
inspector: Add more infrastructure
...
This one introduces the Recording object which is essentially a single
instance of something that happened.
The RenderRecording is an instance of an actual rendering operation.
2016-11-01 18:34:40 +01:00
Benjamin Otte
98a500a434
inspector: Add outline for a new "recorder" tab
2016-11-01 18:34:40 +01:00
Sébastien Wilmet
59a9eda5ae
docs: fix typos in GtkMenuShell
2016-11-01 18:28:09 +01:00
Benjamin Otte
4129b70b96
rendernode: Remove the renderer from the rendernode
2016-11-01 16:32:26 +01:00
Benjamin Otte
a0e63b8a07
rendernode: Require passing a renderer to get_draw_context()
...
This is in preparation of making render nodes independent of the
renderer, so that they can be rendered multiple times with different
renderers.
2016-11-01 16:32:26 +01:00
Benjamin Otte
e201c4dc92
gsk: Remove gsk_render_node_get_scale_factor()
...
Scale factors belong to the renderers, not the nodes. The nodes should
just use whatever scale factor the renderer tells them to when
rendering.
2016-11-01 16:32:26 +01:00
Benjamin Otte
3d8b00600e
gdkgl: Change prototype of function
...
The function does not upload a cairo surface, it uploads pixel data.
So don't take a cairo surface as an argument, take pixel data.
2016-11-01 16:32:26 +01:00
Emmanuele Bassi
02c615cc34
gsk: Use the appropriate GLSL version
...
The GLSL versions are:
OpenGL 2.1: #version 110
OpenGL 3.0: #version 130
OpenGL 3.2: #version 150
OpenGLES 2.0: #version 100
OpenGLES 3.0: #version 300 es
So we need to check the version of the GdkGLContext if we want use the
appropriate version, especially for legacy OpenGL contexts, which can be
both 3.x and 2.x.
2016-11-01 15:00:31 +00:00
Marek Černocký
3c1f72671a
Updated Czech translation
2016-11-01 09:48:00 +01:00
Benjamin Otte
e96c485afa
widget: Create render node with correct bounds
...
We want a render node where (0,0) is the top left of the widget.
However, we need to account for the clip origin not matching the
allocation origin.
2016-11-01 03:59:37 +01:00
Benjamin Otte
8854279e2a
treeview: Clip before translating
...
We want to clip invalidations to the bin window, not the treeview
itself.
2016-11-01 03:51:48 +01:00