The code is very similar; having two slightly different code paths is
bad and can lead to bugs. Refactor the code to use the same height
request function.
For maximized windows, titlebars cannot be used to reposition or
scale the window, so if an application does not use it to convey
useful information (other than the application name), the screen
space occupied by titlebars could be put to better use.
Add a new window property which requests from the window manager
to hide titlebars when windows are maximized to account for this.
https://bugzilla.gnome.org/show_bug.cgi?id=665616
If the scale has an origin (it will have one by default), GtkRange will
render the two sides before/after the current value with different style
classes, making it possible for themes to use different colors and
properties for the two areas.
This was possible in GTK 2 with style details, but got lost during the
road to 3.0.
https://bugzilla.gnome.org/show_bug.cgi?id=665140
In many cases we used to set focus_child to NULL all the way up
to the top and then to the right value, even if there was
a common ancestor, meaning these see a temporary NULL value for
focus_child. Only when the new focus widgets direct parent was
in the previous ancestor list did we stop early.
This fixes that by always stopping propagation when reaching
the common ancestor.
The casting used to calculate the child allocation is confusing MAX().
As a result, width and height end up with negative values, which makes no sense.
https://bugzilla.gnome.org/show_bug.cgi?id=666109
There was a corner case where the changed signal was not emitted.
If rows were built like this:
1 (not selected)
+ 2 (selected)
+ 3 (not selected)
And row 1 was removed, no signal would be emitted.
I like it when writing tests actually finds bugs that have been around
since 2003 - introduced by 4a03ea2334
actually. :)
We get certain cases, in particular with SELECTION_MULTIPLE, where we
cannot figure out in advance of real_set_cursor() if the selection will
actually change.
Previously, the cursor would just become invalid, which used to
reselect the first row in the treeview later on (without a
cursor-changed signal). This leads to a crash now with the recent
refactorings.
The patch is longer than I'd like it to be, but the situation is kinda
complicated, because we want to make sure to move the cursor to a good
row. It works like this:
1) From the deleted row, search forward for the first row that is not
going to be deleted and is not a separator.
2) If no such row exists, search backwards for a row that is not a
separator.
3) If no such node exists, clear the cursor.
Previously the code used a GtkTreeRowReference, which was (a) less
performant and more importantly (b) hiding errors.
The errors being hidden were the referenced row becoming invalid or
collapsed, because such rows would not be valid cursor rows and it would
be necesary to select a new row and emit a "cursor-changed" signal.
So if a crash bisects down to this commit, it is very likely that the
cursor has not correctly been updated and the cursor row is invalid.
Calling gdk_keymap_add_virtual_modifiers causes _all_ virtual
modifiers to be added, which causes problem when they are co-located
on the same real modifier (as Super and Hyper often are). Effectively,
this made it impossible to enter key combinations involving Super,
since they all turn into Super+Hyper.
Move code for child allocation into the child allocation function. Don't
keep it in the overlay allocation code.
See the next commit for why this is useful.
We used to only set the override color or font if it was different
than the existing value. However, that means you can't change it to
an override that is the same as the default value for the property.
With this fixed you can e.g. override with a color of 0,0,0,0 which
you couldn't before.
When gtk_render_arrow() is called, always add an ARROW style class to
the GtkStyleContext before rendering, so themes can specify a different
color for it.
https://bugzilla.gnome.org/show_bug.cgi?id=665420
Just always render the pixbuf ourselves and set it on the GtkImage in
the X11 case.
Code for other backends was already rendering the pixbuf manually before
translating it into a native type, so this greatly simplifies the code.
https://bugzilla.gnome.org/show_bug.cgi?id=665409
Instead of painting the window background on the grip_window we now
only paint it on the GtkWindow->window, and we make the grip_window
have a transparent background.
We can't really make transparent window handle background optional
via css atm, because the handle color is actually based on the
background color, so if that is set to transparent we won't draw
anything.
If no icon size is provided (e.g. when setting icon-name or stock-id
using the GObject property directly), use the default icon size. This
matches the previous GtkImage behavior.