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>
|
2002-09-24 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* src/main.c (main): support --version, #92796 patch from
|
* src/main.c (main): support --version, #92796 patch from
|
||||||
@ -12,6 +22,7 @@
|
|||||||
nearly-identical themes for ease of translation, #70962
|
nearly-identical themes for ease of translation, #70962
|
||||||
|
|
||||||
2002-09-24 Arvind Samptur <arvind.samptur@wipro.com>
|
2002-09-24 Arvind Samptur <arvind.samptur@wipro.com>
|
||||||
|
|
||||||
* src/menu.c: Replace strings Shade with Roll Up and
|
* src/menu.c: Replace strings Shade with Roll Up and
|
||||||
Unshade with Unroll.
|
Unshade with Unroll.
|
||||||
|
|
||||||
|
11
src/stack.c
11
src/stack.c
@ -24,6 +24,7 @@
|
|||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
|
#include "prefs.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
@ -310,15 +311,19 @@ compute_layer (MetaWindow *window)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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;
|
window->layer = META_LAYER_FULLSCREEN;
|
||||||
else
|
else
|
||||||
window->layer = META_LAYER_NORMAL;
|
window->layer = META_LAYER_NORMAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_topic (META_DEBUG_STACK, "Window %s on layer %d\n",
|
meta_topic (META_DEBUG_STACK, "Window %s on layer %d type = %d has_focus = %d\n",
|
||||||
window->desc, window->layer);
|
window->desc, window->layer,
|
||||||
|
window->type, window->has_focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList*
|
static GList*
|
||||||
|
17
src/stack.h
17
src/stack.h
@ -32,14 +32,15 @@ typedef struct _MetaStackOp MetaStackOp;
|
|||||||
/* These MUST be in the order of stacking */
|
/* These MUST be in the order of stacking */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
META_LAYER_DESKTOP = 0,
|
META_LAYER_DESKTOP = 0,
|
||||||
META_LAYER_BOTTOM = 1,
|
META_LAYER_BOTTOM = 1,
|
||||||
META_LAYER_NORMAL = 2,
|
META_LAYER_NORMAL = 2,
|
||||||
META_LAYER_TOP = 3,
|
META_LAYER_TOP = 3,
|
||||||
META_LAYER_DOCK = 4,
|
META_LAYER_DOCK = 4,
|
||||||
META_LAYER_FULLSCREEN = 5,
|
META_LAYER_FULLSCREEN = 5,
|
||||||
META_LAYER_SPLASH = 6,
|
META_LAYER_SPLASH = 6,
|
||||||
META_LAYER_LAST = 7
|
META_LAYER_FOCUSED_WINDOW = 7,
|
||||||
|
META_LAYER_LAST = 8
|
||||||
} MetaStackLayer;
|
} MetaStackLayer;
|
||||||
|
|
||||||
struct _MetaStack
|
struct _MetaStack
|
||||||
|
44
src/window.c
44
src/window.c
@ -1684,8 +1684,6 @@ meta_window_make_fullscreen (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
if (!window->fullscreen)
|
if (!window->fullscreen)
|
||||||
{
|
{
|
||||||
MetaGroup *group;
|
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Fullscreening %s\n", window->desc);
|
"Fullscreening %s\n", window->desc);
|
||||||
|
|
||||||
@ -1695,11 +1693,7 @@ meta_window_make_fullscreen (MetaWindow *window)
|
|||||||
window->fullscreen = TRUE;
|
window->fullscreen = TRUE;
|
||||||
|
|
||||||
meta_stack_freeze (window->screen->stack);
|
meta_stack_freeze (window->screen->stack);
|
||||||
group = meta_window_get_group (window);
|
meta_window_update_layer (window);
|
||||||
if (group)
|
|
||||||
meta_group_update_layers (group);
|
|
||||||
else
|
|
||||||
meta_stack_update_layer (window->screen->stack, window);
|
|
||||||
|
|
||||||
meta_window_raise (window);
|
meta_window_raise (window);
|
||||||
meta_stack_thaw (window->screen->stack);
|
meta_stack_thaw (window->screen->stack);
|
||||||
@ -1725,20 +1719,12 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
if (window->fullscreen)
|
if (window->fullscreen)
|
||||||
{
|
{
|
||||||
MetaGroup *group;
|
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Unfullscreening %s\n", window->desc);
|
"Unfullscreening %s\n", window->desc);
|
||||||
|
|
||||||
window->fullscreen = FALSE;
|
window->fullscreen = FALSE;
|
||||||
|
|
||||||
meta_stack_freeze (window->screen->stack);
|
meta_window_update_layer (window);
|
||||||
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_move_resize (window,
|
meta_window_move_resize (window,
|
||||||
TRUE,
|
TRUE,
|
||||||
@ -3732,6 +3718,9 @@ meta_window_notify_focus (MetaWindow *window,
|
|||||||
XInstallColormap (window->display->xdisplay,
|
XInstallColormap (window->display->xdisplay,
|
||||||
window->colormap);
|
window->colormap);
|
||||||
meta_error_trap_pop (window->display);
|
meta_error_trap_pop (window->display);
|
||||||
|
|
||||||
|
/* move into FOCUSED_WINDOW layer */
|
||||||
|
meta_window_update_layer (window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event->type == FocusOut ||
|
else if (event->type == FocusOut ||
|
||||||
@ -3765,6 +3754,9 @@ meta_window_notify_focus (MetaWindow *window,
|
|||||||
XUninstallColormap (window->display->xdisplay,
|
XUninstallColormap (window->display->xdisplay,
|
||||||
window->colormap);
|
window->colormap);
|
||||||
meta_error_trap_pop (window->display);
|
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);
|
meta_window_destroy_frame (window);
|
||||||
|
|
||||||
/* update stacking constraints */
|
/* update stacking constraints */
|
||||||
meta_stack_update_layer (window->screen->stack, window);
|
meta_window_update_layer (window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6606,8 +6598,9 @@ meta_window_begin_grab_op (MetaWindow *window,
|
|||||||
y + y_offset);
|
y + y_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void meta_window_update_resize_grab_op (MetaWindow *window,
|
void
|
||||||
gboolean update_cursor)
|
meta_window_update_resize_grab_op (MetaWindow *window,
|
||||||
|
gboolean update_cursor)
|
||||||
{
|
{
|
||||||
int x, y, x_offset, y_offset;
|
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,
|
void meta_window_update_resize_grab_op (MetaWindow *window,
|
||||||
gboolean update_cursor);
|
gboolean update_cursor);
|
||||||
|
|
||||||
|
void meta_window_update_layer (MetaWindow *window);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user