mirror of
https://github.com/brl/mutter.git
synced 2025-07-23 18:11:23 +00:00
This change adds support for the new _NET_WM_FULLSCREEN_MONITORS
property and client message. This allows client applications to request that a fullscreen window cover more than one monitor. * src/include/boxes.h: * src/core/boxes.c: Add meta_rectangle_union * src/core/window-private.h: * src/core/window.c: (meta_window_new_with_attrs, meta_window_free, set_net_wm_state, meta_window_update_fullscreen_monitors, meta_window_client_message): Add MetaWindow property to store fullscreen monitors field, update _NET_WM_FULLSCREEN_MONITORS property on windows, and handle client message. * src/core/atomnames.h: Add _NET_WM_FULLSCREEN_MONITORS atom. * src/core/constraints.c (setup_constraint_info): If _NET_WM_FULLSCREEN_MONITORS is interesting, use the data stored in MetaWindow::fullscreen_monitors to determine the fullscreen area instead of the basic xinerama_info area. svn path=/trunk/; revision=4021
This commit is contained in:
@ -392,7 +392,27 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
meta_window_get_work_area_for_xinerama (window,
|
||||
xinerama_info->number,
|
||||
&info->work_area_xinerama);
|
||||
info->entire_xinerama = xinerama_info->rect;
|
||||
|
||||
if (!window->fullscreen || window->fullscreen_monitors[0] == -1)
|
||||
{
|
||||
info->entire_xinerama = xinerama_info->rect;
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = 0;
|
||||
long monitor;
|
||||
|
||||
monitor = window->fullscreen_monitors[i];
|
||||
info->entire_xinerama =
|
||||
window->screen->xinerama_infos[monitor].rect;
|
||||
for (i = 1; i <= 3; i++)
|
||||
{
|
||||
monitor = window->fullscreen_monitors[i];
|
||||
meta_rectangle_union (&info->entire_xinerama,
|
||||
&window->screen->xinerama_infos[monitor].rect,
|
||||
&info->entire_xinerama);
|
||||
}
|
||||
}
|
||||
|
||||
cur_workspace = window->screen->active_workspace;
|
||||
info->usable_screen_region =
|
||||
@ -784,7 +804,9 @@ constrain_fullscreen (MetaWindow *window,
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
if (!window->fullscreen)
|
||||
return TRUE;
|
||||
|
||||
xinerama = info->entire_xinerama;
|
||||
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
too_big = !meta_rectangle_could_fit_rect (&xinerama, &min_size);
|
||||
too_small = !meta_rectangle_could_fit_rect (&max_size, &xinerama);
|
||||
|
Reference in New Issue
Block a user