update to upstream 2.25.1
Merge commit '49cc773eb4801fb0ee3cddeeb1d27042f4a46e2e' into clutter
This commit is contained in:
@@ -75,7 +75,8 @@ static void meta_window_show (MetaWindow *window);
|
||||
static void meta_window_hide (MetaWindow *window);
|
||||
|
||||
static void meta_window_save_rect (MetaWindow *window);
|
||||
static void meta_window_save_user_rect (MetaWindow *window);
|
||||
static void save_user_window_placement (MetaWindow *window);
|
||||
static void force_save_user_window_placement (MetaWindow *window);
|
||||
|
||||
static void meta_window_move_resize_internal (MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
@@ -2457,11 +2458,28 @@ meta_window_save_rect (MetaWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the user_rect regardless of whether the window is maximized or
|
||||
* fullscreen. See save_user_window_placement() for most uses.
|
||||
*
|
||||
* \param window Store current position of this window for future reference
|
||||
*/
|
||||
static void
|
||||
meta_window_save_user_rect (MetaWindow *window)
|
||||
force_save_user_window_placement (MetaWindow *window)
|
||||
{
|
||||
meta_window_get_client_root_coords (window, &window->user_rect);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the user_rect, but only if the window is neither maximized nor
|
||||
* fullscreen, otherwise the window may snap back to those dimensions
|
||||
* (bug #461927).
|
||||
*
|
||||
* \param window Store current position of this window for future reference
|
||||
*/
|
||||
static void
|
||||
save_user_window_placement (MetaWindow *window)
|
||||
{
|
||||
/* We do not save maximized or fullscreen dimensions, otherwise the
|
||||
* window may snap back to those dimensions (Bug #461927). */
|
||||
if (!(META_WINDOW_MAXIMIZED (window) || window->fullscreen))
|
||||
{
|
||||
MetaRectangle user_rect;
|
||||
@@ -3527,13 +3545,11 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
if (need_configure_notify)
|
||||
send_configure_notify (window);
|
||||
|
||||
/* user_rect is the position to restore towards if strut changes occur. Thus
|
||||
* we want user_rect to reflect user position/size changes OR the initial
|
||||
* placement of the window.
|
||||
*/
|
||||
if (is_user_action || !window->placed)
|
||||
meta_window_save_user_rect(window);
|
||||
|
||||
if (!window->placed)
|
||||
force_save_user_window_placement (window);
|
||||
else if (is_user_action)
|
||||
save_user_window_placement (window);
|
||||
|
||||
if (need_move_frame || need_resize_frame ||
|
||||
need_move_client || need_resize_client)
|
||||
{
|
||||
@@ -4575,7 +4591,7 @@ meta_window_move_resize_request (MetaWindow *window,
|
||||
*
|
||||
* See also bug 426519.
|
||||
*/
|
||||
meta_window_save_user_rect(window);
|
||||
save_user_window_placement (window);
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -5329,18 +5345,25 @@ process_property_notify (MetaWindow *window,
|
||||
* can just call reload on the property in the event and get rid of
|
||||
* this if-else chain.
|
||||
*/
|
||||
|
||||
|
||||
if (meta_is_verbose ()) /* avoid looking up the name if we don't have to */
|
||||
{
|
||||
char *property_name = XGetAtomName (window->display->xdisplay,
|
||||
event->atom);
|
||||
|
||||
meta_verbose ("Property notify on %s for %s\n",
|
||||
window->desc, property_name);
|
||||
XFree (property_name);
|
||||
}
|
||||
|
||||
if (event->atom == XA_WM_NAME)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_NAME\n", window->desc);
|
||||
|
||||
/* don't bother reloading WM_NAME if using _NET_WM_NAME already */
|
||||
if (!window->using_net_wm_name)
|
||||
meta_window_reload_property (window, XA_WM_NAME);
|
||||
}
|
||||
else if (event->atom == window->display->atom__NET_WM_NAME)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for NET_WM_NAME\n", window->desc);
|
||||
meta_window_reload_property (window, window->display->atom__NET_WM_NAME);
|
||||
|
||||
/* if _NET_WM_NAME was unset, reload WM_NAME */
|
||||
@@ -5349,15 +5372,12 @@ process_property_notify (MetaWindow *window,
|
||||
}
|
||||
else if (event->atom == XA_WM_ICON_NAME)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_ICON_NAME\n", window->desc);
|
||||
|
||||
/* don't bother reloading WM_ICON_NAME if using _NET_WM_ICON_NAME already */
|
||||
if (!window->using_net_wm_icon_name)
|
||||
meta_window_reload_property (window, XA_WM_ICON_NAME);
|
||||
}
|
||||
else if (event->atom == window->display->atom__NET_WM_ICON_NAME)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for NET_WM_ICON_NAME\n", window->desc);
|
||||
meta_window_reload_property (window, window->display->atom__NET_WM_ICON_NAME);
|
||||
|
||||
/* if _NET_WM_ICON_NAME was unset, reload WM_ICON_NAME */
|
||||
@@ -5366,8 +5386,6 @@ process_property_notify (MetaWindow *window,
|
||||
}
|
||||
else if (event->atom == XA_WM_NORMAL_HINTS)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_NORMAL_HINTS\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window, XA_WM_NORMAL_HINTS);
|
||||
|
||||
/* See if we need to constrain current size */
|
||||
@@ -5375,40 +5393,28 @@ process_property_notify (MetaWindow *window,
|
||||
}
|
||||
else if (event->atom == window->display->atom_WM_PROTOCOLS)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_PROTOCOLS\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window, window->display->atom_WM_PROTOCOLS);
|
||||
}
|
||||
else if (event->atom == XA_WM_HINTS)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_HINTS\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window, XA_WM_HINTS);
|
||||
}
|
||||
else if (event->atom == window->display->atom__MOTIF_WM_HINTS)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for MOTIF_WM_HINTS\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window,
|
||||
window->display->atom__MOTIF_WM_HINTS);
|
||||
}
|
||||
else if (event->atom == XA_WM_CLASS)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_CLASS\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window, XA_WM_CLASS);
|
||||
}
|
||||
else if (event->atom == XA_WM_TRANSIENT_FOR)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_TRANSIENT_FOR\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window, XA_WM_TRANSIENT_FOR);
|
||||
}
|
||||
else if (event->atom ==
|
||||
window->display->atom_WM_WINDOW_ROLE)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for WM_WINDOW_ROLE\n", window->desc);
|
||||
|
||||
update_role (window);
|
||||
}
|
||||
else if (event->atom ==
|
||||
@@ -5421,12 +5427,10 @@ process_property_notify (MetaWindow *window,
|
||||
else if (event->atom ==
|
||||
window->display->atom__NET_WM_WINDOW_TYPE)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for NET_WM_WINDOW_TYPE\n", window->desc);
|
||||
update_net_wm_type (window);
|
||||
}
|
||||
else if (event->atom == window->display->atom__NET_WM_ICON)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for NET_WM_ICON\n", window->desc);
|
||||
meta_icon_cache_property_changed (&window->icon_cache,
|
||||
window->display,
|
||||
event->atom);
|
||||
@@ -5434,8 +5438,6 @@ process_property_notify (MetaWindow *window,
|
||||
}
|
||||
else if (event->atom == window->display->atom__KWM_WIN_ICON)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for KWM_WIN_ICON\n", window->desc);
|
||||
|
||||
meta_icon_cache_property_changed (&window->icon_cache,
|
||||
window->display,
|
||||
event->atom);
|
||||
@@ -5444,20 +5446,15 @@ process_property_notify (MetaWindow *window,
|
||||
else if ((event->atom == window->display->atom__NET_WM_STRUT) ||
|
||||
(event->atom == window->display->atom__NET_WM_STRUT_PARTIAL))
|
||||
{
|
||||
meta_verbose ("Property notify on %s for _NET_WM_STRUT\n", window->desc);
|
||||
meta_window_update_struts (window);
|
||||
}
|
||||
else if (event->atom == window->display->atom__NET_STARTUP_ID)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for _NET_STARTUP_ID\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window,
|
||||
window->display->atom__NET_STARTUP_ID);
|
||||
}
|
||||
else if (event->atom == window->display->atom__NET_WM_SYNC_REQUEST_COUNTER)
|
||||
{
|
||||
meta_verbose ("Property notify on %s for _NET_WM_SYNC_REQUEST_COUNTER\n", window->desc);
|
||||
|
||||
meta_window_reload_property (window,
|
||||
window->display->atom__NET_WM_SYNC_REQUEST_COUNTER);
|
||||
}
|
||||
@@ -5466,8 +5463,6 @@ process_property_notify (MetaWindow *window,
|
||||
Window xid;
|
||||
Atom atom__NET_WM_USER_TIME;
|
||||
|
||||
meta_verbose ("Property notify on %s for _NET_WM_USER_TIME\n", window->desc);
|
||||
|
||||
atom__NET_WM_USER_TIME = window->display->atom__NET_WM_USER_TIME;
|
||||
if (window->user_time_window)
|
||||
xid = window->user_time_window;
|
||||
|
Reference in New Issue
Block a user