Patch from Dan Sanders to fix #335076.

2006-04-15  Elijah Newren  <newren gmail com>

	Patch from Dan Sanders to fix #335076.

	* src/core.c (meta_core_maximize, meta_core_toggle_maximize,
	  meta_core_unmaximize):
	* src/window.c (meta_window_client_message):
	Raise windows on maximize/unmaximize.
This commit is contained in:
Elijah Newren 2006-04-16 02:20:41 +00:00 committed by Elijah Newren
parent 5bf3e39ef6
commit 7e2d5185a0
3 changed files with 38 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2006-04-15 Elijah Newren <newren gmail com>
Patch from Dan Sanders to fix #335076.
* src/core.c (meta_core_maximize, meta_core_toggle_maximize,
meta_core_unmaximize):
* src/window.c (meta_window_client_message):
Raise windows on maximize/unmaximize.
2006-04-15 Elijah Newren <newren gmail com>
* src/display.h: Patch from Andy Morum to fix the build with

View File

@ -389,6 +389,9 @@ meta_core_maximize (Display *xdisplay,
if (window == NULL || window->frame == NULL)
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_maximize (window,
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
}
@ -406,6 +409,9 @@ meta_core_toggle_maximize (Display *xdisplay,
if (window == NULL || window->frame == NULL)
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
if (META_WINDOW_MAXIMIZED (window))
meta_window_unmaximize (window,
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
@ -427,6 +433,9 @@ meta_core_unmaximize (Display *xdisplay,
if (window == NULL || window->frame == NULL)
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_unmaximize (window,
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
}

View File

@ -4460,9 +4460,17 @@ meta_window_client_message (MetaWindow *window,
(action == _NET_WM_STATE_TOGGLE &&
!window->maximized_horizontally));
if (max && window->has_maximize_func)
meta_window_maximize (window, META_MAXIMIZE_HORIZONTAL);
{
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_maximize (window, META_MAXIMIZE_HORIZONTAL);
}
else
meta_window_unmaximize (window, META_MAXIMIZE_HORIZONTAL);
{
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_unmaximize (window, META_MAXIMIZE_HORIZONTAL);
}
}
if (first == display->atom_net_wm_state_maximized_vert ||
@ -4474,9 +4482,17 @@ meta_window_client_message (MetaWindow *window,
(action == _NET_WM_STATE_TOGGLE &&
!window->maximized_vertically));
if (max && window->has_maximize_func)
meta_window_maximize (window, META_MAXIMIZE_VERTICAL);
{
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_maximize (window, META_MAXIMIZE_VERTICAL);
}
else
meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL);
{
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL);
}
}
if (first == display->atom_net_wm_state_modal ||