Commit Graph

49556 Commits

Author SHA1 Message Date
Timm Bäder
7096d6dd28 viewport: Use gtk_widget_measure to measure child sizes
and rewrite the adjustment handling in a orientation-agnostic way.
2016-12-04 12:00:46 +01:00
Timm Bäder
5ee590fbc8 scrolledwindow: measure child widgets using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
1ab3d32808 revealer: Measure child widget size using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
7f8d0acfd3 headerbar: measure children using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
d45e5ef3dc widget-factory: Use GtkButton:icon-name to construct icon buttons 2016-12-04 12:00:45 +01:00
Timm Bäder
5b05c12780 toolpalette: call set_has_window 2016-12-04 12:00:45 +01:00
Timm Bäder
9f98138ffb printunixdialog: Remove GtkDrawingArea::draw handler
the source file has been updated to use gtk_drawing_area_set_draw_func,
but the draw_cb handler in the ui file is still left.
2016-12-04 12:00:38 +01:00
Benjamin Otte
0d68b22479 stylecontext: Remove a bunch of unneeded headers 2016-12-03 18:15:49 +01:00
Daniel Boles
8efc91c4e0 GtkProgressBar: trivial conditional optimisation
I'd hope the compiler would realise this for us, but let's be explicit.
2016-12-03 16:27:03 +00:00
Timm Bäder
3dac21f20b entry: Refactor get_icon_pixbuf
This way it will only return a pixbuf if the icon helper has a pixbuf.
2016-12-03 13:19:26 +01:00
Timm Bäder
8a543ab23c iconhelper: Ensure the surface used for textures is ARGB32 2016-12-03 13:19:26 +01:00
Timm Bäder
49508ddfdb iconhelper: Remove allocate implementation 2016-12-03 13:19:26 +01:00
Timm Bäder
31ed68dbfa listbox: Fix row hovering
GtkListBox is not a windowed widget anymore so we can't use
gtk_widget_get_window. Just directly access priv->view_window instead to
get the right window.
2016-12-03 13:19:26 +01:00
Timm Bäder
fa4d6e8918 spinbutton: Remove _get_panels 2016-12-03 13:19:26 +01:00
Timm Bäder
36377e9964 Remove gtk_widget_get_preferred_height_and_baseline_for_width
It's just a wrapper around gtk_widget_measure nowadays.
2016-12-03 13:19:25 +01:00
Timm Bäder
8d36fbfbaa togglebutton: Remove unused defines 2016-12-03 13:19:25 +01:00
Debarshi Ray
1f7b03bb2b flowbox: Fix get_child_at_index crash with an invalid index
https://bugzilla.gnome.org/show_bug.cgi?id=775525
2016-12-02 19:17:40 +01:00
Daniel Boles
975a3fa4aa ComboBox: Fix the whitespace fix 2016-12-01 12:59:46 +00:00
Daniel Boles
e723fd6a23 ComboBox: Do not select item before menu realised
For a menu mode CB with wrap_width == 0 and an active item, that item is
selected in gtk_combo_box_menu_popup. Selection causes the MenuShell to
activate and hence take a grab. This was done before the menu was popped
up. A patch distributed in Debian sid - after being proposed on our BZ -
revealed that on the 1st popup of any such ComboBox, within grab_add,
the MenuShell's toplevel's GdkWindow is NULL. This causes a Gdk-CRITICAL
assertion fail on the 1st time opening any such CB, on Debian and if
that patch were merged to GTK+. By selecting after popup, we ensure the
MenuShell is realised before its grab_add and so avoid the critical.

https://bugzilla.gnome.org/show_bug.cgi?id=771242
2016-12-01 12:46:12 +00:00
Daniel Boles
a72dbeba06 ComboBox: Fix whitespace
* Replace tabs for indentation with spaces
 * Remove whitespace at ends of lines
2016-12-01 12:46:12 +00:00
Benjamin Otte
e09b78f7f7 cssshadows: Fix extents computation
Someody busted this code a *lot*.
2016-11-30 23:54:49 +01:00
Benjamin Otte
970f99615e image: Don't translate twice
The animation can pass x/y through to the render_icon() function, so
don't gtk_snapshot_translate() it.
2016-11-30 23:54:49 +01:00
Matthias Clasen
92a1abcd23 wayland: Don't warn if we loose the compositor connection
And instead, exit cleanly. This avoids filling the logs with
these warnings from every single application that has a
connection to the compositor.
2016-11-30 13:45:04 -05:00
Matthias Clasen
1c51da82bd x11: Don't warn if the display is closed
This causes a storm of warnings from all applications in the logs
whenever the display goes away, and is not useful.
2016-11-30 13:45:00 -05:00
William Hua
7d18a86140 gsk: ensure libgsk-4.la before running g-ir-scanner
https://bugzilla.gnome.org/show_bug.cgi?id=775410
2016-11-30 10:30:17 -05:00
Benjamin Otte
318e19f570 gskrenderer: Add GError argument to gsk_renderer_realize()
This way, we don't spam criticals when GL is not available. Instead, we
print a useful debug message to stderr and continue with the Cairo renderer.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-11-30 15:58:07 +01:00
Benjamin Otte
5563841603 gsk: Add gsk_renderer_new_for_window()
and remove gsk_renderer_get_for_display().

This new function returns a realized renderer. Because of that, GSK can
catch failures to realize, destroy the renderer and try another one.

Or in short: I can finally use GTK on Weston with the nvidia binary
drivers again.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-11-30 15:56:00 +01:00
Benjamin Otte
ce98df881f gsk: Change gsk_renderer_realize()
Instead of having a gsk_renderer_set_window() call, pass the window to
realize(). This way, the realization can fail with the wrong window.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-11-30 15:55:45 +01:00
Benjamin Otte
efd04b47aa gdk: Make GdkDrawingContext not per-backend
No backend is using it, and we can put the backend-specific drawing code
into GdkGLContext.
2016-11-30 15:52:22 +01:00
Benjamin Otte
bdcfc17c43 gdkwindow: Remove unused vfunc
GdkGLContext knows how to realize itself.
2016-11-30 15:15:08 +01:00
Benjamin Otte
d12c81f177 flowbox: Size gadget realtive to widget->window
This fixes a few clipping issues and syncs code with GtkListBox.
2016-11-30 15:15:08 +01:00
Benjamin Otte
e28d94bc8b listbox: Move the priv->gadget allocation
It used to be relative to the window, now it is relative to the widget.

That is necessary so the snapshot fuction doesn't confuse coordinate
systems.
2016-11-30 15:15:08 +01:00
Benjamin Otte
238334c74e cairorenderer: Remove nonexisting function from header 2016-11-30 15:15:08 +01:00
Olivier Fourdan
bd4519922c wayland: Check for subsurface looking up the toplevel
gdk_window_get_toplevel() walks up the windows tree looking for the
corresponding toplevel window, but needs to account for subsurfaces as
well on Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=775319
2016-11-30 10:05:47 +01:00
Emmanuele Bassi
c8b92cb0d2 demos: Remove undefined function call
The gtk_container_set_border_width() function has been removed from
the GTK+ 4.x API.
2016-11-29 23:29:10 +00:00
Matthias Clasen
ee1ae7f9ed gtk-demo: Add a demo for tabs
One of the least-appreciated features in pango.
It deserves a demo.
2016-11-29 16:40:24 -05:00
Matthias Clasen
0037d4d257 Don't leak a pixbuf reference in dnd
https://bugzilla.gnome.org/show_bug.cgi?id=775316
2016-11-29 14:42:35 -05:00
Matthias Clasen
316b24e0a0 Fix reference handling in GtkScaleButton
We were leaking the adjustment, since we confuse ourselves
with a property whose initial value comes out of a template.
Stop doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=775212
2016-11-28 15:04:20 -05:00
William Hua
3efbb75619 mir: fix build failures 2016-11-27 21:31:21 -05:00
Sébastien Wilmet
82b2bf2184 docs: fix a parameter name of GtkEntry::populate-popup
Trivial commit.

The documentation block refers to @widget, not @popup. @widget is a
better name since the type is GtkWidget.
2016-11-26 12:31:34 +01:00
Sébastien Wilmet
e2881d1e4f docs: fix docs of functions to convert layout_index <-> text_index
Trivial commit.

The documentation was swapped. The documentation for the parameters and
the return values is good.
2016-11-26 12:31:34 +01:00
Benjamin Otte
8161f8dcca rendericon: Pass the scale factor when rendeirng textures
Fixes icon rendeirng on hidpi.
2016-11-26 11:52:30 +01:00
Cosimo Cecchi
7ebbd075b9 Adwaita: make rubberband selection work again for libgd apps
libgd views still use the old style class.
2016-11-25 18:55:12 +01:00
Matthias Clasen
4939cfd67e Make gtk-encode-symbolic-svg work for icons with dotted names
We were producing org.symbolic.png from org.gnome.Recipes-symbolic.svg,
which is not useful. Look for the last dot in the original name, to
produce the expected org.gnome.Recipes-symbolic.symbolic.png instead.
2016-11-25 08:55:33 -05:00
Dominique Leuenberger
cae8fc74ac Build: Add wayland to GSKs dependencies
gskrenderer.c includes gdk/wayland/gdkwayland.h and as a consequence
we need to be able to locate wayland's headers in case they are not
in standard location.

https://bugzilla.gnome.org/show_bug.cgi?id=775038
2016-11-24 19:53:36 +01:00
Benjamin Otte
624e0e1409 gdk: Rewrite docs some more
Now gdk_window_process_updates() isn't mentioned either.

GDK takes care of redrawing, not you!
2016-11-24 18:31:11 +01:00
Benjamin Otte
d7876bde74 inspector: Remove leftover GDK_PRIVATE_CALL()s 2016-11-24 15:41:19 +01:00
Benjamin Otte
4b6e70b9c8 gdk: Get rid of all mentions of process_all_updates() 2016-11-24 15:26:49 +01:00
Olivier Fourdan
39200e75b6 wayland: Place subsurfaces relative to their parent
Now that subsurfaces can be created as child of another GdkWindow (and
not just the root window), they must be placed according to the location
of their parent, i.e. the abs_x/abs_y must be updated and taken int
account when placing and moving subsurfaces under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=774917
2016-11-24 09:32:41 +01:00
Benjamin Otte
ae29d4db5a gdk: Use stricter checks for begin_draw_frame()
We don't support drawing on child windows, so make sure nobody tries.
2016-11-24 04:43:42 +01:00