Commit Graph

15 Commits

Author SHA1 Message Date
Jonas Dreßler
9b99b67fea Remove ClutterAllocationFlags
Those flags were removed from Clutter since they're pretty much unused,
so remove them here, too.

See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1245

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1245
2020-05-20 15:12:03 +02:00
Florian Müllner
120b907c33 shell/stack: Ignore hidden children for focus navigation
ShellStack implements custom focus navigation, and will only ever
navigate into its top-most child. That kind of makes sense as long
as that child is actually visible, but not when it is hidden.

Descend into the stack to look for a focusable child instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
2020-02-24 12:29:44 +00:00
Carlos Garnacho
c59c5eb893 st: Add StDirectionType enum
In order to replace GTK+'s GtkDirectionType. It's bit-compatible with it,
too. All callers have been updated to use it.

This is a purely accessory change in terms of X11 Display usage cleanup,
but helps see better what is left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Florian Müllner
294702d3f1 shell: Use G_DECLARE_*_TYPE macros
Cut down on boilerplate by using the (no longer that) new helper
macros. We don't care about breaking ABI in private libraries, so
use G_DECLARE_FINAL_TYPE even where the class struct used to be
exposed in the header, except for types we inherit from ourselves
(obviously) or where the class exposes any vfuncs (where changes
could affect inheritance in extensions).
2015-10-15 22:58:28 +02:00
Florian Müllner
d21edcfed5 st: Replace deprecated macros 2015-07-22 16:00:55 +02:00
Giovanni Campagna
09e3aed770 St: don't focus hidden actors
If an actors is not mapped (visible and all parents visible), then don't
allow navigating focus to it.
This fixes a regression in the keyboard navigation of the panel with
invisibile items.

https://bugzilla.gnome.org/show_bug.cgi?id=683529
2012-09-10 21:23:25 +02:00
Jasper St. Pierre
d5285674ae st: Remove st-container
At this point, StContainer is a dummy class that does nothing, so it's
safe to remove.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Jasper St. Pierre
d2aab9d6a6 st-container: Remove st_container_get_children_list
Replace it with the new actor iteration APIs. This fixes a few
unintentional memory leaks - st_container_get_children_list
returns an internal list, and clutter_actor_get_children_list
allocates a new list.

https://bugzilla.gnome.org/show_bug.cgi?id=670034

https://bugzilla.gnome.org/show_bug.cgi?id=670910
2012-02-27 15:15:31 -05:00
Jasper St. Pierre
ea19790828 st-widget: Implement a proper allocate
Since an StWidget now has children, it needs to allocate those children
properly. Defer to the currently installed layout manager, like Clutter
does.

Now that we have something that allocates children in St, to prevent
double allocations, we use clutter_actor_set_allocation rather than
chaining up to StWidget::allocate.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Jasper St. Pierre
64b2c5d1b4 st-widget: Add a proper paint, add st_widget_paint_background
Since we want to paint children by default in StWidget, we need to
provide a way for custom subclasses to paint their CSS backgrounds
without painting children... introducing st_widget_paint_background.

Additionally, remove any custom paint/pick handlers added by subclasses
of StWidget that just painted their children. This will cause double
painting if left alone.

This also removes the hacky things that some subclasses of StBin did
to prevent their one child to be painted by StBin.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Dan Winship
9ae8d90be4 ShellStack: make this an StWidget
Base ShellStack on StContainer rather than ClutterGroup, so that it
has StWidget-y features (and so we don't have to "cheat" in
shell_stack_allocate()). Implement navigate_focus() to only ever pass
focus into the top-most child, since doing otherwise would be
surprising.

https://bugzilla.gnome.org/show_bug.cgi?id=646934
2011-09-08 08:49:55 -04:00
Dan Winship
dd8f05c81d include "config.h" in all .c files
Also, fix shell-global.c to actually compile with config.h included.

Was supposed to fix bug 602802, but doesn't...
2009-11-24 09:15:35 -05:00
Colin Walters
3cb54f6707 Fix allocation implementations for ShellStack and ShellDrawingArea
In both, using our allocation directly for the child is wrong; we
should create a new allocation that's our width and height.

In ShellDrawingArea, also need to chain up to parent.
2009-08-27 13:11:19 -04:00
Owen W. Taylor
d243634602 Fix compiler warnings
src/shell-global.c src/shell-process.c: Remove dead code
src/shell-texture-cache.c src/shell-status-menu.c: Remove
  <foo>_new() functions that weren't in the header file and
  not used anyways:
src/shell-texture-cache.[ch]: Fix a prototype that used ()
  when (void) was intended.

http://bugzilla.gnome.org/show_bug.cgi?id=590998
2009-08-06 16:46:55 -04:00
Colin Walters
a15ee28177 Add ShellDrawingArea and ShellStack
ShellDrawingArea is a size-independent wrapper for a ClutterCairoTexture.
Useful when drawing non-fixed size areas.

ShellStack is a simple container class which holds items
in a completely overlapping Z stack.  The main difference
from ClutterGroup is that items will be constrained to
(and allocated) the size of the stack, not getting their
preferred size always.
2009-07-06 14:11:18 -04:00