mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
make it static
2002-10-01 Havoc Pennington <hp@pobox.com> * src/screen.c (meta_screen_resize_func): make it static * src/stack.c (get_standalone_layer): put above/below windows in an appropriate layer. * src/screen.c (set_supported_hint): say we support above/below * src/display.h (struct _MetaDisplay): add _NET_WM_STATE_ABOVE, _NET_WM_STATE_BELOW atoms * src/window.c (meta_window_client_message): handle above/below state messages (set_net_wm_state): handler above/below state (update_net_wm_state): handle above/below states
This commit is contained in:
parent
791ab07bd4
commit
94b6dde6bb
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
|||||||
|
2002-10-01 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/screen.c (meta_screen_resize_func): make it static
|
||||||
|
|
||||||
|
* src/stack.c (get_standalone_layer): put above/below windows
|
||||||
|
in an appropriate layer.
|
||||||
|
|
||||||
|
* src/screen.c (set_supported_hint): say we support above/below
|
||||||
|
|
||||||
|
* src/display.h (struct _MetaDisplay): add _NET_WM_STATE_ABOVE,
|
||||||
|
_NET_WM_STATE_BELOW atoms
|
||||||
|
|
||||||
|
* src/window.c (meta_window_client_message): handle above/below
|
||||||
|
state messages
|
||||||
|
(set_net_wm_state): handler above/below state
|
||||||
|
(update_net_wm_state): handle above/below states
|
||||||
|
|
||||||
2002-10-01 Mark McLoughlin <mark@skynet.ie>
|
2002-10-01 Mark McLoughlin <mark@skynet.ie>
|
||||||
|
|
||||||
* src/screen.c: (meta_screen_new): default to
|
* src/screen.c: (meta_screen_new): default to
|
||||||
|
@ -221,6 +221,8 @@ meta_display_open (const char *name)
|
|||||||
"_NET_WM_ACTION_MAXIMIZE_VERT",
|
"_NET_WM_ACTION_MAXIMIZE_VERT",
|
||||||
"_NET_WM_ACTION_CHANGE_DESKTOP",
|
"_NET_WM_ACTION_CHANGE_DESKTOP",
|
||||||
"_NET_WM_ACTION_CLOSE",
|
"_NET_WM_ACTION_CLOSE",
|
||||||
|
"_NET_WM_STATE_ABOVE",
|
||||||
|
"_NET_WM_STATE_BELOW"
|
||||||
};
|
};
|
||||||
Atom atoms[G_N_ELEMENTS(atom_names)];
|
Atom atoms[G_N_ELEMENTS(atom_names)];
|
||||||
|
|
||||||
@ -350,6 +352,8 @@ meta_display_open (const char *name)
|
|||||||
display->atom_net_wm_action_maximize_vert = atoms[72];
|
display->atom_net_wm_action_maximize_vert = atoms[72];
|
||||||
display->atom_net_wm_action_change_desktop = atoms[73];
|
display->atom_net_wm_action_change_desktop = atoms[73];
|
||||||
display->atom_net_wm_action_close = atoms[74];
|
display->atom_net_wm_action_close = atoms[74];
|
||||||
|
display->atom_net_wm_state_above = atoms[75];
|
||||||
|
display->atom_net_wm_state_below = atoms[76];
|
||||||
|
|
||||||
/* Offscreen unmapped window used for _NET_SUPPORTING_WM_CHECK,
|
/* Offscreen unmapped window used for _NET_SUPPORTING_WM_CHECK,
|
||||||
* created in screen_new
|
* created in screen_new
|
||||||
|
@ -147,6 +147,8 @@ struct _MetaDisplay
|
|||||||
Atom atom_net_wm_action_maximize_vert;
|
Atom atom_net_wm_action_maximize_vert;
|
||||||
Atom atom_net_wm_action_change_desktop;
|
Atom atom_net_wm_action_change_desktop;
|
||||||
Atom atom_net_wm_action_close;
|
Atom atom_net_wm_action_close;
|
||||||
|
Atom atom_net_wm_state_above;
|
||||||
|
Atom atom_net_wm_state_below;
|
||||||
|
|
||||||
/* This is the actual window from focus events,
|
/* This is the actual window from focus events,
|
||||||
* not the one we last set
|
* not the one we last set
|
||||||
|
@ -84,7 +84,7 @@ set_wm_check_hint (MetaScreen *screen)
|
|||||||
static int
|
static int
|
||||||
set_supported_hint (MetaScreen *screen)
|
set_supported_hint (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
#define N_SUPPORTED 42
|
#define N_SUPPORTED 44
|
||||||
#define N_WIN_SUPPORTED 1
|
#define N_WIN_SUPPORTED 1
|
||||||
Atom atoms[N_SUPPORTED];
|
Atom atoms[N_SUPPORTED];
|
||||||
|
|
||||||
@ -130,6 +130,8 @@ set_supported_hint (MetaScreen *screen)
|
|||||||
atoms[39] = screen->display->atom_net_wm_action_maximize_vert;
|
atoms[39] = screen->display->atom_net_wm_action_maximize_vert;
|
||||||
atoms[40] = screen->display->atom_net_wm_action_change_desktop;
|
atoms[40] = screen->display->atom_net_wm_action_change_desktop;
|
||||||
atoms[41] = screen->display->atom_net_wm_action_close;
|
atoms[41] = screen->display->atom_net_wm_action_close;
|
||||||
|
atoms[42] = screen->display->atom_net_wm_state_above;
|
||||||
|
atoms[43] = screen->display->atom_net_wm_state_below;
|
||||||
|
|
||||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||||
screen->display->atom_net_supported,
|
screen->display->atom_net_supported,
|
||||||
@ -1520,7 +1522,7 @@ meta_screen_calc_workspace_layout (MetaScreen *screen,
|
|||||||
*c = cols;
|
*c = cols;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
meta_screen_resize_func (MetaScreen *screen,
|
meta_screen_resize_func (MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
|
@ -191,7 +191,10 @@ get_standalone_layer (MetaWindow *window)
|
|||||||
|
|
||||||
case META_WINDOW_DOCK:
|
case META_WINDOW_DOCK:
|
||||||
/* still experimenting here */
|
/* still experimenting here */
|
||||||
layer = META_LAYER_DOCK;
|
if (window->wm_state_below)
|
||||||
|
layer = META_LAYER_BOTTOM;
|
||||||
|
else
|
||||||
|
layer = META_LAYER_DOCK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_WINDOW_SPLASHSCREEN:
|
case META_WINDOW_SPLASHSCREEN:
|
||||||
@ -205,6 +208,8 @@ get_standalone_layer (MetaWindow *window)
|
|||||||
layer = META_LAYER_FOCUSED_WINDOW;
|
layer = META_LAYER_FOCUSED_WINDOW;
|
||||||
else if (window->fullscreen)
|
else if (window->fullscreen)
|
||||||
layer = META_LAYER_FULLSCREEN;
|
layer = META_LAYER_FULLSCREEN;
|
||||||
|
else if (window->wm_state_above)
|
||||||
|
layer = META_LAYER_TOP;
|
||||||
else
|
else
|
||||||
layer = META_LAYER_NORMAL;
|
layer = META_LAYER_NORMAL;
|
||||||
break;
|
break;
|
||||||
|
40
src/window.c
40
src/window.c
@ -389,6 +389,8 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
|||||||
window->skip_pager = FALSE;
|
window->skip_pager = FALSE;
|
||||||
window->wm_state_skip_taskbar = FALSE;
|
window->wm_state_skip_taskbar = FALSE;
|
||||||
window->wm_state_skip_pager = FALSE;
|
window->wm_state_skip_pager = FALSE;
|
||||||
|
window->wm_state_above = FALSE;
|
||||||
|
window->wm_state_below = FALSE;
|
||||||
|
|
||||||
window->res_class = NULL;
|
window->res_class = NULL;
|
||||||
window->res_name = NULL;
|
window->res_name = NULL;
|
||||||
@ -1063,6 +1065,16 @@ set_net_wm_state (MetaWindow *window)
|
|||||||
data[i] = window->display->atom_net_wm_state_hidden;
|
data[i] = window->display->atom_net_wm_state_hidden;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
if (window->wm_state_above)
|
||||||
|
{
|
||||||
|
data[i] = window->display->atom_net_wm_state_above;
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
if (window->wm_state_below)
|
||||||
|
{
|
||||||
|
data[i] = window->display->atom_net_wm_state_below;
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
|
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
|
||||||
|
|
||||||
@ -3440,6 +3452,26 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
|
|
||||||
set_net_wm_state (window);
|
set_net_wm_state (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (first == display->atom_net_wm_state_above ||
|
||||||
|
second == display->atom_net_wm_state_above)
|
||||||
|
{
|
||||||
|
window->wm_state_above =
|
||||||
|
(action == _NET_WM_STATE_ADD) ||
|
||||||
|
(action == _NET_WM_STATE_TOGGLE && !window->wm_state_above);
|
||||||
|
|
||||||
|
set_net_wm_state (window);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (first == display->atom_net_wm_state_below ||
|
||||||
|
second == display->atom_net_wm_state_below)
|
||||||
|
{
|
||||||
|
window->wm_state_below =
|
||||||
|
(action == _NET_WM_STATE_ADD) ||
|
||||||
|
(action == _NET_WM_STATE_TOGGLE && !window->wm_state_below);
|
||||||
|
|
||||||
|
set_net_wm_state (window);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -4363,6 +4395,8 @@ update_net_wm_state (MetaWindow *window)
|
|||||||
window->wm_state_modal = FALSE;
|
window->wm_state_modal = FALSE;
|
||||||
window->wm_state_skip_taskbar = FALSE;
|
window->wm_state_skip_taskbar = FALSE;
|
||||||
window->wm_state_skip_pager = FALSE;
|
window->wm_state_skip_pager = FALSE;
|
||||||
|
window->wm_state_above = FALSE;
|
||||||
|
window->wm_state_below = FALSE;
|
||||||
|
|
||||||
if (meta_prop_get_atom_list (window->display, window->xwindow,
|
if (meta_prop_get_atom_list (window->display, window->xwindow,
|
||||||
window->display->atom_net_wm_state,
|
window->display->atom_net_wm_state,
|
||||||
@ -4387,7 +4421,11 @@ update_net_wm_state (MetaWindow *window)
|
|||||||
window->wm_state_skip_pager = TRUE;
|
window->wm_state_skip_pager = TRUE;
|
||||||
else if (atoms[i] == window->display->atom_net_wm_state_fullscreen)
|
else if (atoms[i] == window->display->atom_net_wm_state_fullscreen)
|
||||||
window->fullscreen = TRUE;
|
window->fullscreen = TRUE;
|
||||||
|
else if (atoms[i] == window->display->atom_net_wm_state_above)
|
||||||
|
window->wm_state_above = TRUE;
|
||||||
|
else if (atoms[i] == window->display->atom_net_wm_state_below)
|
||||||
|
window->wm_state_below = TRUE;
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +162,10 @@ struct _MetaWindow
|
|||||||
/* Computed whether to skip taskbar or not */
|
/* Computed whether to skip taskbar or not */
|
||||||
guint skip_taskbar : 1;
|
guint skip_taskbar : 1;
|
||||||
guint skip_pager : 1;
|
guint skip_pager : 1;
|
||||||
|
|
||||||
|
/* TRUE if client set these */
|
||||||
|
guint wm_state_above : 1;
|
||||||
|
guint wm_state_below : 1;
|
||||||
|
|
||||||
/* this flag tracks receipt of focus_in focus_out and
|
/* this flag tracks receipt of focus_in focus_out and
|
||||||
* determines whether we draw the focus
|
* determines whether we draw the focus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user