summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 95d49885..30ebfa85 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -461,6 +461,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->maximize_horizontally_after_placement = FALSE;
window->maximize_vertically_after_placement = FALSE;
window->minimize_after_placement = FALSE;
+ window->move_after_placement = FALSE;
window->fullscreen = FALSE;
window->fullscreen_after_placement = FALSE;
window->fullscreen_monitors[0] = -1;
@@ -2346,6 +2347,13 @@ meta_window_show (MetaWindow *window)
if (takes_focus_on_map)
{
meta_window_focus (window, timestamp);
+
+ if (window->move_after_placement)
+ {
+ meta_window_begin_grab_op(window, META_GRAB_OP_KEYBOARD_MOVING,
+ FALSE, timestamp);
+ window->move_after_placement = FALSE;
+ }
}
else
{
@@ -2670,14 +2678,9 @@ meta_window_maximize (MetaWindow *window,
if (window->tile_mode != META_TILE_NONE)
{
saved_rect = &window->saved_rect;
- window->maximized_vertically = FALSE;
- }
-
- if (window->tile_mode != META_TILE_NONE)
- {
- saved_rect = &window->saved_rect;
window->maximized_vertically = FALSE;
+ window->tile_mode = META_TILE_NONE;
}
meta_window_maximize_internal (window,
@@ -2751,7 +2754,7 @@ meta_window_can_tile (MetaWindow *window)
MetaRectangle tile_area;
/*if (!META_WINDOW_ALLOWS_RESIZE (window))*/
- if (!META_WINDOW_ALLOWS_RESIZE (window))
+ if (!meta_window_can_tile_maximized (window) || window->shaded)
return FALSE;
monitor = meta_screen_get_current_xinerama (window->screen);
@@ -2780,15 +2783,6 @@ meta_window_unmaximize (MetaWindow *window,
/* At least one of the two directions ought to be set */
gboolean unmaximize_horizontally, unmaximize_vertically;
- /* Restore tiling if necessary */
- if (window->tile_mode == META_TILE_LEFT ||
- window->tile_mode == META_TILE_RIGHT)
- {
- window->maximized_horizontally = FALSE;
- meta_window_tile (window);
- return;
- }
-
unmaximize_horizontally = directions & META_MAXIMIZE_HORIZONTAL;
unmaximize_vertically = directions & META_MAXIMIZE_VERTICAL;
g_assert (unmaximize_horizontally || unmaximize_vertically);
@@ -3333,6 +3327,7 @@ send_sync_request (MetaWindow *window)
ev.data.l[1] = meta_display_get_current_time (window->display);
ev.data.l[2] = XSyncValueLow32 (value);
ev.data.l[3] = XSyncValueHigh32 (value);
+ ev.data.l[4] = 0;
/* We don't need to trap errors here as we are already
* inside an error_trap_push()/pop() pair.
@@ -5194,8 +5189,7 @@ meta_window_client_message (MetaWindow *window,
{
meta_verbose ("WM_CHANGE_STATE client message, state: %ld\n",
event->xclient.data.l[0]);
- if (event->xclient.data.l[0] == IconicState &&
- window->has_minimize_func)
+ if (event->xclient.data.l[0] == IconicState)
meta_window_minimize (window);
return TRUE;
@@ -5599,6 +5593,8 @@ static gboolean
process_property_notify (MetaWindow *window,
XPropertyEvent *event)
{
+ Window xid = window->xwindow;
+
if (meta_is_verbose ()) /* avoid looking up the name if we don't have to */
{
char *property_name = XGetAtomName (window->display->xdisplay,
@@ -5609,7 +5605,13 @@ process_property_notify (MetaWindow *window,
XFree (property_name);
}
- meta_window_reload_property (window, event->atom, FALSE);
+ if (event->atom == window->display->atom__NET_WM_USER_TIME &&
+ window->user_time_window)
+ {
+ xid = window->user_time_window;
+ }
+
+ meta_window_reload_property_from_xwindow (window, xid, event->atom, FALSE);
return TRUE;
}
@@ -6735,8 +6737,8 @@ meta_window_show_menu (MetaWindow *window,
if (!window->has_maximize_func)
insensitive |= META_MENU_OP_UNMAXIMIZE | META_MENU_OP_MAXIMIZE;
- /*if (!window->has_minimize_func)
- insensitive |= META_MENU_OP_MINIMIZE;*/
+ if (!window->has_minimize_func)
+ insensitive |= META_MENU_OP_MINIMIZE;
/*if (!window->has_close_func)
insensitive |= META_MENU_OP_DELETE;*/