Commit Graph

42333 Commits

Author SHA1 Message Date
Matthias Clasen
c9267b30d7 inspector: Avoid a NULL deref
Coverity pointed out that getting a class name requires
dereferencing the pointer, so only don't do it if it is NULL.
2015-07-17 19:55:04 -04:00
Matthias Clasen
6ea7c290a3 GtkWindow: Fix a use-after-free
We were printing a string in a warning after freeing it.
Also, fix an x/y typo that might cause popovers to be
mispositioned.
2015-07-17 19:24:02 -04:00
Matthias Clasen
0993cdf79f file chooser: remove an unused GError variable
Pointed out by coverity
2015-07-17 19:23:43 -04:00
Matthias Clasen
32c81cfd65 inspector: Remove some dead code
Not sure what I was thinking here. Coverity pointed this out.
2015-07-17 19:22:24 -04:00
Matthias Clasen
575f334ce5 inspector: Avoid a NULL deref 2015-07-17 19:22:13 -04:00
Matthias Clasen
48fba6911a treeview: Add an explicit return for clarity
I believe that first_column can only ever be NULL here if
last_column is NULL too, in which case we'd exited already.
But coverity doesn't see that, so add an explicit exit.
2015-07-17 19:22:05 -04:00
Matthias Clasen
d833c05f6e tooltip: Remove unnecessary checks
Coverity uses these as clues to complain.
2015-07-17 19:21:55 -04:00
Matthias Clasen
66f9dcd93b list box: Remove unnecessary checks
Again, coverity takes these as clues to complain.
2015-07-17 19:21:48 -04:00
Matthias Clasen
236d2d3cf1 GtkLabel: Remove an unnecessary check
Coverity has the annoying habit of guessing backwards that
if we check the value here, it might be NULL earlier.
2015-07-17 19:21:36 -04:00
Matthias Clasen
ff9349bfdd GtkActionHelper: Avoid null deref in debug code 2015-07-17 19:21:24 -04:00
Matthias Clasen
2f817322fd GtkGrid: Add a few NULL checks
Coverity complained about these.
2015-07-17 19:21:12 -04:00
Matthias Clasen
5557dd8fce gdk: Add some parameter checking
This may help coverity recognize that we're not called with
invalid combinations.
2015-07-17 19:21:03 -04:00
Matthias Clasen
ff7d67b33c testdialog: Error out if templates are missing
Coverity complained about us ignoring the return value
here, and it is nicer to get an error message about this.
2015-07-17 16:10:30 -04:00
Matthias Clasen
3460a4d507 cups: Annotate a call whose return value we don't care about
We're closing this fd, but we're not going to do anything else
if that fails. Annotate to let coverity see this.
2015-07-17 16:09:47 -04:00
Matthias Clasen
5bbf0baa7f inspector: Check a return value
We don't care about the error here, but we were relying on
g_resources_get_info to zero the size even in case of error.
No need to do that, we can just check the return value. Plus,
it makes coverity happy.
2015-07-17 16:09:39 -04:00
Matthias Clasen
2c7974a69d inspector: Annotate a call whose return value we don't need
The way this code is written, we know that there is an item in
the hash table and the iter_next call will give it to us, so
no need to check the return value. Annotate the call to tell
coverity.
2015-07-17 16:09:32 -04:00
Matthias Clasen
64affb0406 gtkicontheme: Check a return value
We were already looking at the error anyway, but rewriting things
this way lets coverity see the light.
2015-07-17 16:09:23 -04:00
Matthias Clasen
0558b0c439 gtkbuilderparser: Add some assertions
Add some assertions that things are non-NULL when we know they
are, so that coverity gets it.
2015-07-17 16:09:11 -04:00
Matthias Clasen
7566066000 gtk-demo: Check a return value
Found by coverity.
2015-07-17 16:08:54 -04:00
Balázs Úr
683ccd28e8 Updated Hungarian translation 2015-07-17 14:14:46 +00:00
Carlos Garnacho
7c35d52f3c Revert "x11: Query pointer devices' scroll valuators on toplevel enter events"
This reverts commit 3d9cce79cf.

The commit broke more scenarios than fixed, better to go back to square one.
2015-07-15 23:45:49 +02:00
Owen W. Taylor
1a8e9dbb8f GdkDisplayX11: Properly translate server timestamps from _NET_WM_FRAME_* messages
When using frame times from _NET_WM_FRAME_DRAWN and _NET_WM_FRAME_TIMINGS, we
were treating them as local monotonic times, but they are actually extended-precision
versions of the server time, and need to be translated to monotonic times in the
case where the X server and client aren't running on the same system.

This fixes rendering stalls when using X over a remote ssh connection.
https://bugzilla.gnome.org/show_bug.cgi?id=741800
2015-07-15 12:47:55 -04:00
Aurimas Černius
bb1750c05f Updated Lithuanian translation 2015-07-10 00:08:44 +03:00
Matej Urbančič
afa82a63a9 Updated Slovenian translation 2015-07-08 15:39:00 +02:00
Piotr Drąg
657d0d79b3 Updated Polish translation 2015-07-07 20:26:24 +02:00
Tom Schoonjans
1539cdd783 gdkwindow-quartz: partial aspect ratio support
Support was added for GDK_HINT_ASPECT in
gdk_quartz_window_set_geometry_hints though with one restriction:
min_aspect and max_aspect have to be equal, which I believe corresponds
to the most common usage. A warning will be printed if this condition is
not met but min_aspect will be used anyway.
2015-07-07 10:22:11 -07:00
Matthias Clasen
85ff269adf 3.16.5 3.16.5 2015-07-07 11:23:39 -04:00
Cosimo Cecchi
92933fd3ad reftests: fix style class syntax in CSS file
Fixes reftests.

https://bugzilla.gnome.org/show_bug.cgi?id=750605
2015-07-07 11:23:39 -04:00
Jasper St. Pierre
28e7721075 gdkdisplay-x11: The leader window should be an input-only window
This prevents it from creating a _NET_WM_USER_TIME_WINDOW, which can
confuse mutter / other window managers, and also me, when debugging.
2015-07-07 10:31:13 -04:00
Emmanuele Bassi
a074d86842 docs: Drop deprecated symbolic icon names
Do not suggest using icons that do not exist.
2015-07-07 10:30:46 -04:00
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