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:
parent
5bf3e39ef6
commit
7e2d5185a0
@ -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>
|
2006-04-15 Elijah Newren <newren gmail com>
|
||||||
|
|
||||||
* src/display.h: Patch from Andy Morum to fix the build with
|
* src/display.h: Patch from Andy Morum to fix the build with
|
||||||
|
@ -389,6 +389,9 @@ meta_core_maximize (Display *xdisplay,
|
|||||||
if (window == NULL || window->frame == NULL)
|
if (window == NULL || window->frame == NULL)
|
||||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
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_window_maximize (window,
|
||||||
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
||||||
}
|
}
|
||||||
@ -406,6 +409,9 @@ meta_core_toggle_maximize (Display *xdisplay,
|
|||||||
if (window == NULL || window->frame == NULL)
|
if (window == NULL || window->frame == NULL)
|
||||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
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))
|
if (META_WINDOW_MAXIMIZED (window))
|
||||||
meta_window_unmaximize (window,
|
meta_window_unmaximize (window,
|
||||||
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
||||||
@ -427,6 +433,9 @@ meta_core_unmaximize (Display *xdisplay,
|
|||||||
if (window == NULL || window->frame == NULL)
|
if (window == NULL || window->frame == NULL)
|
||||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
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_window_unmaximize (window,
|
||||||
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
||||||
}
|
}
|
||||||
|
24
src/window.c
24
src/window.c
@ -4460,9 +4460,17 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
(action == _NET_WM_STATE_TOGGLE &&
|
(action == _NET_WM_STATE_TOGGLE &&
|
||||||
!window->maximized_horizontally));
|
!window->maximized_horizontally));
|
||||||
if (max && window->has_maximize_func)
|
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
|
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 ||
|
if (first == display->atom_net_wm_state_maximized_vert ||
|
||||||
@ -4474,9 +4482,17 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
(action == _NET_WM_STATE_TOGGLE &&
|
(action == _NET_WM_STATE_TOGGLE &&
|
||||||
!window->maximized_vertically));
|
!window->maximized_vertically));
|
||||||
if (max && window->has_maximize_func)
|
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
|
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 ||
|
if (first == display->atom_net_wm_state_modal ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user