new function
2002-09-24 Havoc Pennington <hp@redhat.com> * src/window.c (meta_window_update_layer): new function * src/stack.c (compute_layer): put focused window in a layer above all other windows, in click-to-focus mode. #93022 * src/window.c (meta_window_notify_focus): update window layer on focus change.
This commit is contained in:
parent
d027c27ca1
commit
4694ded7cd
11
ChangeLog
11
ChangeLog
@ -1,3 +1,13 @@
|
||||
2002-09-24 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/window.c (meta_window_update_layer): new function
|
||||
|
||||
* src/stack.c (compute_layer): put focused window in a layer above
|
||||
all other windows, in click-to-focus mode. #93022
|
||||
|
||||
* src/window.c (meta_window_notify_focus): update window layer on
|
||||
focus change.
|
||||
|
||||
2002-09-24 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/main.c (main): support --version, #92796 patch from
|
||||
@ -12,6 +22,7 @@
|
||||
nearly-identical themes for ease of translation, #70962
|
||||
|
||||
2002-09-24 Arvind Samptur <arvind.samptur@wipro.com>
|
||||
|
||||
* src/menu.c: Replace strings Shade with Roll Up and
|
||||
Unshade with Unroll.
|
||||
|
||||
|
11
src/stack.c
11
src/stack.c
@ -24,6 +24,7 @@
|
||||
#include "errors.h"
|
||||
#include "frame.h"
|
||||
#include "group.h"
|
||||
#include "prefs.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
@ -310,15 +311,19 @@ compute_layer (MetaWindow *window)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (group_member_is_fullscreen (window))
|
||||
if (window->has_focus &&
|
||||
meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
window->layer = META_LAYER_FOCUSED_WINDOW;
|
||||
else if (group_member_is_fullscreen (window))
|
||||
window->layer = META_LAYER_FULLSCREEN;
|
||||
else
|
||||
window->layer = META_LAYER_NORMAL;
|
||||
break;
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_STACK, "Window %s on layer %d\n",
|
||||
window->desc, window->layer);
|
||||
meta_topic (META_DEBUG_STACK, "Window %s on layer %d type = %d has_focus = %d\n",
|
||||
window->desc, window->layer,
|
||||
window->type, window->has_focus);
|
||||
}
|
||||
|
||||
static GList*
|
||||
|
@ -39,7 +39,8 @@ typedef enum
|
||||
META_LAYER_DOCK = 4,
|
||||
META_LAYER_FULLSCREEN = 5,
|
||||
META_LAYER_SPLASH = 6,
|
||||
META_LAYER_LAST = 7
|
||||
META_LAYER_FOCUSED_WINDOW = 7,
|
||||
META_LAYER_LAST = 8
|
||||
} MetaStackLayer;
|
||||
|
||||
struct _MetaStack
|
||||
|
42
src/window.c
42
src/window.c
@ -1684,8 +1684,6 @@ meta_window_make_fullscreen (MetaWindow *window)
|
||||
{
|
||||
if (!window->fullscreen)
|
||||
{
|
||||
MetaGroup *group;
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Fullscreening %s\n", window->desc);
|
||||
|
||||
@ -1695,11 +1693,7 @@ meta_window_make_fullscreen (MetaWindow *window)
|
||||
window->fullscreen = TRUE;
|
||||
|
||||
meta_stack_freeze (window->screen->stack);
|
||||
group = meta_window_get_group (window);
|
||||
if (group)
|
||||
meta_group_update_layers (group);
|
||||
else
|
||||
meta_stack_update_layer (window->screen->stack, window);
|
||||
meta_window_update_layer (window);
|
||||
|
||||
meta_window_raise (window);
|
||||
meta_stack_thaw (window->screen->stack);
|
||||
@ -1725,20 +1719,12 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
||||
{
|
||||
if (window->fullscreen)
|
||||
{
|
||||
MetaGroup *group;
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Unfullscreening %s\n", window->desc);
|
||||
|
||||
window->fullscreen = FALSE;
|
||||
|
||||
meta_stack_freeze (window->screen->stack);
|
||||
group = meta_window_get_group (window);
|
||||
if (group)
|
||||
meta_group_update_layers (group);
|
||||
else
|
||||
meta_stack_update_layer (window->screen->stack, window);
|
||||
meta_stack_thaw (window->screen->stack);
|
||||
meta_window_update_layer (window);
|
||||
|
||||
meta_window_move_resize (window,
|
||||
TRUE,
|
||||
@ -3732,6 +3718,9 @@ meta_window_notify_focus (MetaWindow *window,
|
||||
XInstallColormap (window->display->xdisplay,
|
||||
window->colormap);
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
/* move into FOCUSED_WINDOW layer */
|
||||
meta_window_update_layer (window);
|
||||
}
|
||||
}
|
||||
else if (event->type == FocusOut ||
|
||||
@ -3765,6 +3754,9 @@ meta_window_notify_focus (MetaWindow *window,
|
||||
XUninstallColormap (window->display->xdisplay,
|
||||
window->colormap);
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
/* move out of FOCUSED_WINDOW layer */
|
||||
meta_window_update_layer (window);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5234,7 +5226,7 @@ recalc_window_type (MetaWindow *window)
|
||||
meta_window_destroy_frame (window);
|
||||
|
||||
/* update stacking constraints */
|
||||
meta_stack_update_layer (window->screen->stack, window);
|
||||
meta_window_update_layer (window);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6606,7 +6598,8 @@ meta_window_begin_grab_op (MetaWindow *window,
|
||||
y + y_offset);
|
||||
}
|
||||
|
||||
void meta_window_update_resize_grab_op (MetaWindow *window,
|
||||
void
|
||||
meta_window_update_resize_grab_op (MetaWindow *window,
|
||||
gboolean update_cursor)
|
||||
{
|
||||
int x, y, x_offset, y_offset;
|
||||
@ -6634,3 +6627,16 @@ void meta_window_update_resize_grab_op (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_update_layer (MetaWindow *window)
|
||||
{
|
||||
MetaGroup *group;
|
||||
|
||||
meta_stack_freeze (window->screen->stack);
|
||||
group = meta_window_get_group (window);
|
||||
if (group)
|
||||
meta_group_update_layers (group);
|
||||
else
|
||||
meta_stack_update_layer (window->screen->stack, window);
|
||||
meta_stack_thaw (window->screen->stack);
|
||||
}
|
||||
|
@ -421,4 +421,6 @@ void meta_window_begin_grab_op (MetaWindow *window,
|
||||
void meta_window_update_resize_grab_op (MetaWindow *window,
|
||||
gboolean update_cursor);
|
||||
|
||||
void meta_window_update_layer (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user