diff --git a/ChangeLog b/ChangeLog index eb53c42b1..954947eae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-04-15 Elijah Newren + + 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 * src/display.h: Patch from Andy Morum to fix the build with diff --git a/src/core.c b/src/core.c index eec011571..7474e838f 100644 --- a/src/core.c +++ b/src/core.c @@ -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); } diff --git a/src/window.c b/src/window.c index 155fa48d4..27cdd77de 100644 --- a/src/window.c +++ b/src/window.c @@ -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 ||