mirror of
https://github.com/brl/mutter.git
synced 2025-08-07 00:54:42 +00:00
MetaScreen: Add tracking of whether there are fullscreen windows
Trying to track the fullscreen status outside of Mutter, as GNOME Shell was doing previously, was very prone to errors, because Mutter has a very tricky definition of when a window is set to be fullscreen and *actually* acting like a fullscreen window. * Add meta_screen_get_monitor_in_fullscreen() and an ::in-fullscreen-changed signal. This allows an application to track when there are fullscreen windows on a monitor. * Do the computation of fullscreen status in a "later" function that runs after showing, so we properly take focus into account. * To get ordering of different phases right, add more values to MetaLaterType. * Add auto-minimization, similar to what was added to GNOME Shell earlier in this cycle - if a window is set to be fullscreen, but not actually fullscreen, minimize. https://bugzilla.gnome.org/show_bug.cgi?id=649748
This commit is contained in:
@@ -82,6 +82,9 @@ void meta_screen_get_monitor_geometry (MetaScreen *screen,
|
||||
int monitor,
|
||||
MetaRectangle *geometry);
|
||||
|
||||
gboolean meta_screen_get_monitor_in_fullscreen (MetaScreen *screen,
|
||||
int monitor);
|
||||
|
||||
int meta_screen_get_monitor_index_for_rect (MetaScreen *screen,
|
||||
MetaRectangle *rect);
|
||||
|
||||
|
@@ -167,12 +167,18 @@ GPid meta_show_dialog (const char *type,
|
||||
* MetaLaterType:
|
||||
* @META_LATER_RESIZE: call in a resize processing phase that is done
|
||||
* before GTK+ repainting (including window borders) is done.
|
||||
* @META_LATER_CALC_SHOWING: used by Mutter to compute which windows should be mapped
|
||||
* @META_LATER_CHECK_FULLSCREEN: used by Mutter to see if there's a fullscreen window
|
||||
* @META_LATER_SYNC_STACK: used by Mutter to send it's idea of the stacking order to the server
|
||||
* @META_LATER_BEFORE_REDRAW: call before the stage is redrawn
|
||||
* @META_LATER_IDLE: call at a very low priority (can be blocked
|
||||
* by running animations or redrawing applications)
|
||||
**/
|
||||
typedef enum {
|
||||
META_LATER_RESIZE,
|
||||
META_LATER_CALC_SHOWING,
|
||||
META_LATER_CHECK_FULLSCREEN,
|
||||
META_LATER_SYNC_STACK,
|
||||
META_LATER_BEFORE_REDRAW,
|
||||
META_LATER_IDLE
|
||||
} MetaLaterType;
|
||||
|
Reference in New Issue
Block a user