GNOME Bugzilla – Bug 654639
shell-global cleanup/simplification
Last modified: 2011-08-03 13:14:08 UTC
see patches
Created attachment 191992 [details] [review] shell-global: keep better track of screens and displays Rather than constantly asking mutter for the MetaScreen, and then figuring out the MetaDisplay/Display/etc from there, just keep track of everything we care about inside ShellGlobal.
Created attachment 191993 [details] [review] shell-global: add a "display" property and update callers to fetch that rather than doing "global.screen.get_display()"
Created attachment 191994 [details] [review] shell-global: remove "gratuitous" meta_plugin_* calls MetaPlugin wraps a bunch of compositor (and plain metacity) methods that we can just call ourselves, so just do that. (Presumably this dates back to some ancient time when it was imagined that plugins wouldn't need access to the full metacity API.)
Review of attachment 191994 [details] [review]: ::: src/shell-global.c @@ +703,3 @@ g_return_val_if_fail (SHELL_IS_GLOBAL (global), NULL); + return meta_get_window_actors (global->meta_screen); Can this be removed altogether, and callers do Meta.get_window_actors(global.screen)? (or even better, change mutter API to meta_screen_get_window_actors, so global.screen.get_window_actors() works as expected)
(In reply to comment #4) > Can this be removed altogether, and callers do > Meta.get_window_actors(global.screen)? Yes... although that's more typing. > (or even better, change mutter API to meta_screen_get_window_actors, so > global.screen.get_window_actors() works as expected) The MetaScreen doesn't know about the MetaWindowActors though. However, in almost every place where call get_window_actors(), we end up looking at both the MetaWindowActor and the MetaWindow, so maybe we should just expose meta_display_list_windows(). But this could happen later.
assigning to Giovanni for review since he already looked at it before...
Review of attachment 191994 [details] [review]: It may also be worth nuking the old meta_plugin_ bits at some point too. But this looks fine for now.
Review of attachment 191992 [details] [review]: Looks obviously correct.
Review of attachment 191993 [details] [review]: Looks good.
Attachment 191992 [details] pushed as b262a42 - shell-global: keep better track of screens and displays Attachment 191993 [details] pushed as aed50e2 - shell-global: add a "display" property Attachment 191994 [details] pushed as 7765d6a - shell-global: remove "gratuitous" meta_plugin_* calls