mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
add _NET_WM_STATE_HIDDEN to _NET_SUPPORTED
2002-02-08 Havoc Pennington <hp@pobox.com> * src/screen.c (set_supported_hint): add _NET_WM_STATE_HIDDEN to _NET_SUPPORTED * src/keybindings.c (meta_set_keybindings_disabled): put in header file, to fix warning. * src/display.c (meta_display_open): add _NET_WM_STATE_HIDDEN atom * src/window.c (set_net_wm_state): set _NET_WM_STATE_HIDDEN for shaded and minimized windows (meta_window_show): call set_net_wm_state() if we map the window or frame (meta_window_hide): call set_net_wm_state() if we unmap the window or frame
This commit is contained in:
parent
bd712d7f8f
commit
844a8ac13f
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2002-02-08 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/screen.c (set_supported_hint): add _NET_WM_STATE_HIDDEN
|
||||
to _NET_SUPPORTED
|
||||
|
||||
* src/keybindings.c (meta_set_keybindings_disabled): put in header
|
||||
file, to fix warning.
|
||||
|
||||
* src/display.c (meta_display_open): add _NET_WM_STATE_HIDDEN atom
|
||||
|
||||
* src/window.c (set_net_wm_state): set _NET_WM_STATE_HIDDEN for
|
||||
shaded and minimized windows
|
||||
(meta_window_show): call set_net_wm_state() if we map the window
|
||||
or frame
|
||||
(meta_window_hide): call set_net_wm_state() if we unmap the window
|
||||
or frame
|
||||
|
||||
2002-02-08 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/window.c (set_net_wm_state): only set skip pager/tasklist if
|
||||
|
@ -143,7 +143,8 @@ meta_display_open (const char *name)
|
||||
"_NET_WM_STRUT",
|
||||
"_WIN_HINTS",
|
||||
"_METACITY_RELOAD_THEME_MESSAGE",
|
||||
"_METACITY_SET_KEYBINDINGS_MESSAGE"
|
||||
"_METACITY_SET_KEYBINDINGS_MESSAGE",
|
||||
"_NET_WM_STATE_HIDDEN"
|
||||
};
|
||||
Atom atoms[G_N_ELEMENTS(atom_names)];
|
||||
|
||||
@ -241,6 +242,7 @@ meta_display_open (const char *name)
|
||||
display->atom_win_hints = atoms[46];
|
||||
display->atom_metacity_reload_theme_message = atoms[47];
|
||||
display->atom_metacity_set_keybindings_message = atoms[48];
|
||||
display->atom_net_wm_state_hidden = atoms[49];
|
||||
|
||||
/* Offscreen unmapped window used for _NET_SUPPORTING_WM_CHECK,
|
||||
* created in screen_new
|
||||
|
@ -108,6 +108,7 @@ struct _MetaDisplay
|
||||
Atom atom_win_hints;
|
||||
Atom atom_metacity_reload_theme_message;
|
||||
Atom atom_metacity_set_keybindings_message;
|
||||
Atom atom_net_wm_state_hidden;
|
||||
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
|
@ -35,6 +35,7 @@ void meta_window_ungrab_all_keys (MetaWindow *window);
|
||||
void meta_display_process_key_event (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event);
|
||||
void meta_set_keybindings_disabled (gboolean setting);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -78,7 +78,7 @@ set_wm_check_hint (MetaScreen *screen)
|
||||
static int
|
||||
set_supported_hint (MetaScreen *screen)
|
||||
{
|
||||
#define N_SUPPORTED 23
|
||||
#define N_SUPPORTED 24
|
||||
#define N_WIN_SUPPORTED 1
|
||||
Atom atoms[N_SUPPORTED];
|
||||
|
||||
@ -105,6 +105,7 @@ set_supported_hint (MetaScreen *screen)
|
||||
atoms[20] = screen->display->atom_net_wm_state_skip_pager;
|
||||
atoms[21] = screen->display->atom_net_wm_icon;
|
||||
atoms[22] = screen->display->atom_net_wm_moveresize;
|
||||
atoms[23] = screen->display->atom_net_wm_state_hidden;
|
||||
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_supported,
|
||||
|
15
src/window.c
15
src/window.c
@ -845,7 +845,12 @@ set_net_wm_state (MetaWindow *window)
|
||||
data[i] = window->display->atom_net_wm_state_maximized_vert;
|
||||
++i;
|
||||
}
|
||||
|
||||
if (window->shaded || window->minimized)
|
||||
{
|
||||
data[i] = window->display->atom_net_wm_state_hidden;
|
||||
++i;
|
||||
}
|
||||
|
||||
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
|
||||
|
||||
meta_error_trap_push (window->display);
|
||||
@ -1106,6 +1111,7 @@ meta_window_show (MetaWindow *window)
|
||||
"Frame actually needs map\n");
|
||||
window->frame->mapped = TRUE;
|
||||
meta_ui_map_frame (window->screen->ui, window->frame->xwindow);
|
||||
did_show = TRUE;
|
||||
}
|
||||
|
||||
if (window->shaded)
|
||||
@ -1150,7 +1156,6 @@ meta_window_show (MetaWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (did_placement)
|
||||
{
|
||||
if (window->xtransient_for != None)
|
||||
@ -1179,6 +1184,8 @@ meta_window_show (MetaWindow *window)
|
||||
|
||||
if (did_show)
|
||||
{
|
||||
set_net_wm_state (window);
|
||||
|
||||
if (window->has_struts)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
@ -1227,9 +1234,11 @@ meta_window_hide (MetaWindow *window)
|
||||
window->iconic = TRUE;
|
||||
set_wm_state (window, IconicState);
|
||||
}
|
||||
|
||||
|
||||
if (did_hide)
|
||||
{
|
||||
set_net_wm_state (window);
|
||||
|
||||
if (window->has_struts)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
|
Loading…
Reference in New Issue
Block a user