Commit Graph

42303 Commits

Author SHA1 Message Date
Emmanuele Bassi
9ff88ce2c7 container: Update the add() warning
Now that gtk_widget_reparent() has been deprecated, we should not
suggest it.
2015-07-07 10:30:37 -04:00
Matthias Clasen
d509888580 GtkSwitch: fix a reentry issue
The introduction of state broke some users which relied on
being able to set active in a notify::active handler.

https://bugzilla.gnome.org/show_bug.cgi?id=751754
2015-07-07 10:30:00 -04:00
Carlos Garnacho
3d9cce79cf x11: Query pointer devices' scroll valuators on toplevel enter events
We used to "invalidate" scroll valuators, so the next scroll event could
be used as the base for the next scroll deltas. This has the inconvenience
that it invariably consumes the first event received after enter and,
due to interactions with WM overeager passive button grabs, there's a
possibility we don't scroll at all if we receive interleaved "smooth
scroll" XI_Motion events and XI_Enter events (Normally triggered by regular
scroll wheels in mice).

In order to fix this, and at the expense of some sync-call overhead on
XI_Enter events (one XIQueryDevice call per slave device), query the
current scroll valuator state for all the slaves of the entered pointer,
so we do know beforehand the right base values. If new devices are plugged
while the pointer is on top of the client, the initialized scroll values
will match the valuators'.

https://bugzilla.gnome.org/show_bug.cgi?id=750994
https://bugzilla.gnome.org/show_bug.cgi?id=750870
2015-07-07 10:29:39 -04:00
Carlos Garnacho
a90c7f191f x11: Avoid X error traps within server grabs
gdk_x11_device_xi2_window_at_position() may attempt to push/pop
a few error trap pairs while traversing the window tree. Move it
outside the server grab, and around the multiple XIQueryPointer
calls we may do here.

https://bugzilla.gnome.org/show_bug.cgi?id=751739
2015-07-07 10:29:16 -04:00
Krzesimir Nowak
45767b8eaa broadway: Fix memleak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=751752
2015-07-07 10:29:10 -04:00
Jasper St. Pierre
4223812fdc window: Don't send startup notifications for offscreen / popup windows
The WM isn't aware of O-R (popup) or offscreen windows. If somebody
maps an offscreen or a popup GTK+ window before the main window, we'll
complete the sequence before a "real" window is mapped. Make sure to
ignore these for startup notifies.
2015-07-07 10:28:48 -04:00
Alexander Larsson
facf2ac2bb broadway: Handle shm_open failing by falling back on tmp files
This is required if /dev/shm is not mounted on your system, which can
happen for instance in certain container configurations.
2015-07-07 10:28:19 -04:00
cedlemo
533f4bf966 GtkImage: Make resource property work properly
gtk_image_set_from_resource was setting the resource_path,
only to have it overwritten again before returning. That
is not as it should be, so change things to set the resource
path late.

https://bugzilla.gnome.org/show_bug.cgi?id=751443
2015-07-07 10:27:50 -04:00
Matthias Clasen
905ccd1862 GtkRange: Improve zoom handling a bit
The calculation to update the initial slider position on zoom
changes was not working correctly when using keys to toggle
zoom on and off for scales. Avoid it by updating the position
beforehand.
2015-07-07 10:26:45 -04:00
Matthias Clasen
8d3fb714f0 GtkRange: Make drag gesture less agressive
Moving the mouse while pressing one of the steppers was making
the slider jump to the end, unexpectedly. This was caused by the
drag gesture kicking in when it shouldn't. Fix this by making
all drag gesture signal handlers only do something if we are in
a drag thats started on the slider.

https://bugzilla.gnome.org/show_bug.cgi?id=751050
2015-07-07 10:26:35 -04:00
Caolán McNamara
8da9fc8d4f file chooser: Avoid tall combos
The filter combo box in the file chooser was stretching to match
the height of the extra widgets next to it. Since, stretched combo
boxes are not a pretty sight, make it stick to the top instead.

Patch by Caolán McNamara,

https://bugzilla.gnome.org/show_bug.cgi?id=751227
2015-07-07 10:26:21 -04:00
Alexander Larsson
5abc4af10a configure: test have_docbook_style != yes, not have_docbook_dtd 2015-07-07 10:25:07 -04:00
Christian Hergert
22d0c317c2 treeview: always pixelcache widget contents
GtkTreeView has a particularly expensive drawing path. This can cause
issues when part of animated widget sequences. Caching the content while
a model is attached helps reduce the number of full redraws during
exposure greatly.

https://bugzilla.gnome.org/show_bug.cgi?id=751082
2015-07-07 10:24:38 -04:00
Christian Hergert
b33270aa7c pixelcache: allow widgets to always require cached content
Some widgets have very expensive drawing paths. So caching the content
can be useful even when not scrolling.

This can help speed up widgets that are part of animation sequences and
thereby go through spurious expose events.

https://bugzilla.gnome.org/show_bug.cgi?id=751082
2015-07-07 10:24:30 -04:00
Christian Hergert
0af53e9d5a gdkwindow: avoid updating background pattern if it matches previous
Background patterns are often updated when style changes. In many cases,
the new pattern will match the previous. We can optimize out the
invalidation that will occur upon resetting the same pattern.
2015-07-07 10:24:04 -04:00
Matthias Clasen
db690c621d Deal with events from wrong display
GtkInspector is opening a separate display connection, which makes
it more likely that gtk_get_current_event() returns an event from
the "wrong" display.
2015-07-07 10:23:46 -04:00
Matthias Clasen
cf120a0fa8 GtkMenuButton: Make programmatic toggling work again
This was broken in 0796d7b6ff.

https://bugzilla.gnome.org/show_bug.cgi?id=751018
2015-07-07 10:23:31 -04:00
Matthias Clasen
f770957d6a GtkMenuButton: Avoid direct button access
We were getting ourselves in trouble by casting touch events
to GdkEventButton and poking directly at their internals. Instead,
use GdkEvent API to get what we need.

This fixes a crash when using the gear menu in epiphany with
touch. The same crash also occurred in testmenubutton.
2015-07-07 10:23:22 -04:00
Matthias Clasen
37e36e7f1d color editor: make popups toggleable
The popups on the color editor are somewhat hard to get rid of.
Arrange things so that clicking the same control again dismisses
the current popup.
2015-07-07 10:22:51 -04:00
Matthias Clasen
356edc5483 Don't show a menu on the color editor swatch
There's nothing to customize here, so no need to show a menu.
2015-07-07 10:22:46 -04:00
Matthias Clasen
6f7f1028fa Add a way to avoid menu on color swatches 2015-07-07 10:22:38 -04:00
Ting-Wei Lan
72d298229f Fix 'void function should not return void expression' warning for clang
https://bugzilla.gnome.org/show_bug.cgi?id=750888
2015-07-07 10:21:44 -04:00
Cosimo Cecchi
3139588797 testsuite: add a test for non-square symbolic icons
To verify the previous fix.

https://bugzilla.gnome.org/show_bug.cgi?id=750605
2015-07-07 10:20:58 -04:00
Cosimo Cecchi
5cd3714de4 icontheme: don't modify symbolic SVG dimensions when recoloring
When recoloring symbolic SVG, do not modify the original width and
height of the passed-in file; the function later will scale the image
through gdk_pixbuf_new_from_stream_at_scale(), but we should still
use the original size to create the proxy SVG, or the image will
possibly be doubly-resized or blurry.

https://bugzilla.gnome.org/show_bug.cgi?id=750605
2015-07-07 10:20:50 -04:00
Matthias Clasen
f123bd92bb recent chooser: Make it expand
It is expected that the list fills the available space.

https://bugzilla.gnome.org/show_bug.cgi?id=750690
2015-07-07 10:20:38 -04:00
Emmanuele Bassi
39cb51bb07 settings: Fix the type annotation for color-hash
The (element-type) annotation cannot be used with properties that return
container types like GHashTable; we need to use the (type) annotation.

https://bugzilla.gnome.org/show_bug.cgi?id=750489
2015-07-07 10:20:06 -04:00
Emmanuele Bassi
ba750ec9d2 builder: Skip introspecting lookup_callback_symbol()
Opaque function pointers as return values are not really usable in high
level languages, even via introspection.
2015-07-07 10:19:59 -04:00
Emmanuele Bassi
21b616e2b3 docs: Fix annotation for GtkGLArea::resize signal
We need to document all arguments for the signal, for both gtk-doc and
introspection.
2015-07-07 10:19:50 -04:00
Emmanuele Bassi
13b84cd35f docs: Improve deprecation notices for GtkSettings
The button and menu item icons settings are deprecated; application
developers should control whether or not a widget should show an icon,
using the existing API.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-07-07 10:19:41 -04:00
Emmanuele Bassi
5ae01c4f2c docs: Improve deprecation notices for GtkMisc
Point to the replacement properties and functions.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-07-07 10:19:33 -04:00
Emmanuele Bassi
dacdf753bf docs: Improve deprecation notice for rules-hint property
Specify that the theme is wholly in control.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-07-07 10:19:27 -04:00
Emmanuele Bassi
ddade37d79 docs: Improve deprecation notices for GtkImageMenuItem properties
Should help porting code away from the deprecated GtkImageMenuItem
class.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-07-07 10:19:21 -04:00
Emmanuele Bassi
3b0be42f72 docs: Add deprecation notices for GtkAlignment properties
We want people to port their code away from deprecated classes, and this
helps finding a replacement.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-07-07 10:19:14 -04:00
Carlos Soriano
d67cf43be9 gtklistboxrow: propagate in the draw vfunc
So objects connected by g_signal_connect_after actually get
the signal.
This was causing an issue in the dnd highlight, since there
a cairo rectangle is draw using g_signal_connect_after on the draw
signal.
2015-07-07 10:18:57 -04:00
Benjamin Otte
227b5a81bc render: Fix ridge/groove border rendering
The typo strikes again!
2015-06-23 22:31:25 +02:00
Niels Nesse
3258d5ba2e x11/gl: Removing some more legacy GL calls
They are not required any more.

http://bugzilla.gnome.org/show_bug.cgi?id=746668
(cherry picked from commit 641e280311)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2015-06-22 12:35:59 +01:00
Emmanuele Bassi
b45caa8999 x11/gl: Do not call glEnable/glDisable with GL_TEXTURE_2D
These are fixed pipeline functions, and Mesa will warn (if debugging
messages are enabled). At best, they are poinless calls.

(cherry picked from commit 6bd7526ee7)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2015-06-22 12:35:44 +01:00
Christian Kirbach
8e4cd4cc7a Updated German translation 2015-06-14 08:53:41 +00:00
Benjamin Otte
ebdd24ac3a fontchooser: Don't cause "row-changed" signal in cell data func
The font chooser delays creating the font description from the font face
as long as possible (it's slow). Because we use fixed height mode, we
only have to create font descriptions for rows we are actually going to
show.

This was achieved by looking at the font description column and if it
was NULL, we created a font description and gtk_list_stiore_set() it.
Unfortunately this caused a "row-changed" signal to be emitted and this
emission could happen during the cell data func.
And that caused infinite loops with accessibility when you were unlucky.

This change replaces the NULL font description with an empty one and
instead of setting the correct font description, we
pango_font_description_merge() it in. This way, the list store doesn't
change and no signals are emitted.

https://bugzilla.redhat.com/show_bug.cgi?id=1197267
2015-06-12 21:23:34 +02:00
Matthias Clasen
93abfb10ad 3.16.4 3.16.4 2015-06-10 10:47:19 -04:00
Matthias Clasen
3ef53101ab gtk-demo: Make hypertext demo work with touch
Make tapping on the links work.
2015-06-10 10:37:58 -04:00
Benjamin Otte
2cf5eddceb widget: Clarify docs on gtk_widget_set_double_buffered()
Also make them more scary so people really really don't use it as a
random knob when trying to make things go fast.

//bugzilla.gnome.org/show_bug.cgi?id=750505
2015-06-10 10:37:42 -04:00
Timm Bäder
b867f1970c gtkfilechooserbutton: Align the label to the left
Using GtkLabel's xalign property so the label doesn't jump around when
the button gets resized.

https://bugzilla.gnome.org/show_bug.cgi?id=750477
2015-06-10 10:34:22 -04:00
Rui Matos
d87769dcd5 main: Push the current event on the stack before we start needing it
The changes in commit 13e22e2030 made
_gtk_window_check_handle_wm_event() indirectly depend on
gtk_get_current_event_time() which relies on the current event being
available on the current_events stack.

Since the current event is only pushed on the stack afterwards we get
an invalid timestamp which breaks ewmh window moving.

This fixes the issue by pushing the current event before we start
relying on it being there in gtk_main_do_event() and, as a byproduct,
also fixes a potential memory leak when we have a rewritten event and
return early due to _gtk_window_check_handle_wm_event() being TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=750384
2015-06-08 13:44:30 +02:00
John Ralls
6ff49ee93d Bug 745957 - GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel
Implement gtk_drag_cancel, made public in c160ba069 and 62616a71, in
gtkdnd-quartz.c.
2015-05-31 11:52:35 -07:00
John Ralls
673013ac67 Fix DnD Introspection on Quartz Backend.
Don't exclude the -quartz.c files from introspection_files.
2015-05-29 13:40:25 -07:00
Cédric Valmary
e2b9ac89b0 Updated Occitan translation 2015-05-29 20:27:17 +00:00
Matthias Clasen
bb0561f356 Fix a cornercase crash
If gtk_text_layout_move_cursor_visually is called with a
count of 0, we were passing NULL to a free function that
can't handle it. Don't do that.

https://bugzilla.gnome.org/show_bug.cgi?id=750058
2015-05-29 00:00:38 -04:00
Cosimo Cecchi
de93dd85e0 Use built-in gtk-update-icon-cache
To generate the icon cache files.

We want to avoid a dependency loop if possible; additionally, on some
Debian-based systems gtk-update-icon-cache maps to the GTK2 version of
the utility and the GTK3 version is renamed to
gtk-update-icon-cache-3.0.

To avoid a build dependency on GTK2, use the binary that we just built
in-tree.

https://bugzilla.gnome.org/show_bug.cgi?id=749593
2015-05-28 23:59:35 -04:00
Cosimo Cecchi
c73715db09 parse-sass: don't hardcode bash path
It's /bin/bash on some systems; just use /bin/sh instead.

https://bugzilla.gnome.org/show_bug.cgi?id=749593
2015-05-28 23:59:26 -04:00