Create COMPLIANCE document describing metacity specification compliance.

2003-11-16  Rob Adams  <readams@readams.net>

	Create COMPLIANCE document describing metacity specification
	compliance.  Right now gives detailed EWMH compliance; still need
	to add ICCCM compliance information.  Also some minor fixes to
	bring metacity into compliance on some points.

	* COMPLIANCE: new file

	* src/display.h, src/display.c (meta_display_open),
	src/screen.c (set_supported_hint): add
	atom_net_wm_action_fullscreen and atom_net_wm_action_minimize

	* src/window.c (set_allowed_actions_hint): some fixes to which
	hints to set and add fullscreen and minimize.
This commit is contained in:
Rob Adams 2003-11-17 00:06:58 +00:00 committed by Rob Adams
parent 67c36f0917
commit 9378a4fb4d
6 changed files with 214 additions and 19 deletions

149
COMPLIANCE Normal file
View File

@ -0,0 +1,149 @@
Metacity Standards Compliance
=============================
$Id$
1) Introduction
2) EWMH Compliance
a. Root Window Properties
b. Root Window Messages
c. Application Window Properties
d. Window Manager Protocols
3) ICCCM Compliance
1) Introduction
---------------
This document details metacity compliance with the relevent standards.
The format of this document is as follows:
[-/+*?] Hint Name/Feature Name (Version number)
Errata/Comments
The first character indicates the level of compliance as follows:
- none
/ partial
+ complete
? unknown
The title indicates a feature or a hint in the specification, and the
version number indicates the minimum version of the specification
supported by metacity. Later versions may be supported if no
incompatible changes have been made in the specification.
2) EWMH Compliance
------------------
The EWMH, or Extended Window Manager Hints is a freedesktop.org-
developed standard to support a number of conventions for
communication between the window manager and clients. It builds on
and extends the ICCCM (See Section 2). A copy of the current EWMH
standard is available at http://freedesktop.org/Standards/wm-spec/
a. Root Window Properties
-------------------------
+ _NET_SUPPORTED (1.3)
+ _NET_CLIENT_LIST (1.3)
+ _NET_NUMBER_OF_DESKTOPS (1.3)
- _NET_DESKTOP_GEOMETRY (-)
Metacity does not implement large desktops. Regardless, according
to the specification, metacity SHOULD set this property to the
screen size, and update it if the screen size changes because of a
RandR change.
- _NET_DESKTOP_VIEWPORT (-)
Metacity does not implement viewports. However, according to the
specification, metacity MUST set this property to (0,0)
+ _NET_CURRENT_DESKTOP (1.3)
+ _NET_DESKTOP_NAMES (1.3)
+ _NET_ACTIVE_WINDOW (1.3)
+ _NET_WORKAREA (1.3)
+ _NET_SUPPORTING_WM_CHECK (1.3)
+ _NET_VIRTUAL_ROOTS (1.3)
Metacity does not read or set this property, but it does not use
virtual roots to implement virtual desktops, so it complies with the
specification.
+ _NET_DESKTOP_LAYOUT (1.3)
+ _NET_SHOWING_DESKTOP (1.3)
b. Root Window Messages
-----------------------
+ _NET_CLOSE_WINDOW (1.3)
- _NET_MOVERESIZE_WINDOW (-)
Metacity does not support this message. The specification states
that metacity should treat this message like a ConfigureRequest.
Not hard to implement; just hasn't been done.
+ _NET_WM_MOVERESIZE (1.3)
c. Application Window Properties
--------------------------------
+ _NET_WM_NAME (1.3)
+ _NET_WM_VISIBLE_NAME (1.3)
Metacity does not set this property, but metacity will never display
a name different from _NET_WM_NAME
+ _NET_WM_ICON_NAME (1.3)
+ _NET_WM_VISIBLE_ICON_NAME (1.3)
Metacity does not set this property, but metacity will never display
a name different from _NET_WM_NAME
+ _NET_WM_DESKTOP (1.3)
+ _NET_WM_WINDOW_TYPE (1.3)
/ _NET_WM_STATE (1.3)
Metacity does not recognize separate vertical and horizontal
maximization states. Currently metacity will do a two-dimensional
maximization if either property is set.
See: http://bugzilla.gnome.org/show_bug.cgi?id=113601
Metacity doesn't implement viewports so _NET_WM_STATE_STICKY is
unimplemented.
+ _NET_WM_ALLOWED_ACTIONS (1.3)
Metacity keeps this hint up to date. The code is somewhat crufty
and should be rewritten, though it is functional.
See: http://bugzilla.gnome.org/show_bug.cgi?id=90420
+ _NET_WM_STRUT (1.3)
+ _NET_WM_STRUT_PARTIAL (1.3)
+ _NET_WM_ICON_GEOMETRY (1.3)
Metacity uses this property to draw minimize/restore animations
+ _NET_WM_ICON (1.3)
+ _NET_WM_PID (1.3)
+ _NET_WM_HANDLED_ICONS (1.3)
Metacity does not read or set this property. However, metacity
never managed iconified windows, and so has no need to do so.
- _NET_WM_USER_TIME (-)
Metacity does not read or set this property. The EWMH does not
require it to do so, but it should support it.
d. Window Manager Protocols
---------------------------
+ _NET_WM_PING (1.3)
3) ICCCM Compliance
-------------------
TODO

View File

@ -1,3 +1,19 @@
2003-11-16 Rob Adams <readams@readams.net>
Create COMPLIANCE document describing metacity specification
compliance. Right now gives detailed EWMH compliance; still need
to add ICCCM compliance information. Also some minor fixes to
bring metacity into compliance on some points.
* COMPLIANCE: new file
* src/display.h, src/display.c (meta_display_open),
src/screen.c (set_supported_hint): add
atom_net_wm_action_fullscreen and atom_net_wm_action_minimize
* src/window.c (set_allowed_actions_hint): some fixes to which
hints to set and add fullscreen and minimize.
2003-11-16 Rob Adams <readams@readams.net>
* src/window.c (meta_window_notify_focus): add paranoia check to

View File

@ -270,7 +270,9 @@ meta_display_open (const char *name)
"_GNOME_PANEL_ACTION_MAIN_MENU",
"_GNOME_PANEL_ACTION_RUN_DIALOG",
"_METACITY_SENTINEL",
"_NET_WM_STRUT_PARTIAL"
"_NET_WM_STRUT_PARTIAL",
"_NET_WM_ACTION_FULLSCREEN",
"_NET_WM_ACTION_MINIMIZE"
};
Atom atoms[G_N_ELEMENTS(atom_names)];
@ -413,6 +415,8 @@ meta_display_open (const char *name)
display->atom_gnome_panel_action_run_dialog = atoms[78];
display->atom_metacity_sentinel = atoms[79];
display->atom_net_wm_strut_partial = atoms[80];
display->atom_net_wm_action_fullscreen = atoms[81];
display->atom_net_wm_action_minimize = atoms[82];
display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (display);

View File

@ -152,6 +152,8 @@ struct _MetaDisplay
Atom atom_net_wm_allowed_actions;
Atom atom_net_wm_action_move;
Atom atom_net_wm_action_resize;
Atom atom_net_wm_action_fullscreen;
Atom atom_net_wm_action_minimize;
Atom atom_net_wm_action_shade;
Atom atom_net_wm_action_stick;
Atom atom_net_wm_action_maximize_horz;

View File

@ -81,7 +81,7 @@ set_wm_check_hint (MetaScreen *screen)
static int
set_supported_hint (MetaScreen *screen)
{
#define N_SUPPORTED 49
#define N_SUPPORTED 68
Atom atoms[N_SUPPORTED];
atoms[0] = screen->display->atom_net_wm_name;
@ -132,7 +132,26 @@ set_supported_hint (MetaScreen *screen)
atoms[45] = screen->display->atom_net_wm_action_close;
atoms[46] = screen->display->atom_net_wm_state_above;
atoms[47] = screen->display->atom_net_wm_state_below;
atoms[48] = screen->display->atom_net_startup_id;
atoms[48] = screen->display->atom_net_wm_pid;
atoms[49] = screen->display->atom_net_workarea;
atoms[50] = screen->display->atom_net_showing_desktop;
atoms[51] = screen->display->atom_net_desktop_layout;
atoms[52] = screen->display->atom_net_desktop_names;
atoms[53] = screen->display->atom_net_wm_allowed_actions;
atoms[54] = screen->display->atom_net_wm_action_move;
atoms[55] = screen->display->atom_net_wm_action_resize;
atoms[56] = screen->display->atom_net_wm_action_shade;
atoms[57] = screen->display->atom_net_wm_action_stick;
atoms[58] = screen->display->atom_net_wm_action_maximize_horz;
atoms[59] = screen->display->atom_net_wm_action_maximize_vert;
atoms[60] = screen->display->atom_net_wm_action_change_desktop;
atoms[61] = screen->display->atom_net_wm_action_close;
atoms[62] = screen->display->atom_net_wm_state_above;
atoms[63] = screen->display->atom_net_wm_state_below;
atoms[64] = screen->display->atom_net_startup_id;
atoms[65] = screen->display->atom_net_wm_strut_partial;
atoms[66] = screen->display->atom_net_wm_action_fullscreen;
atoms[67] = screen->display->atom_net_wm_action_minimize;
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom_net_supported,
@ -1588,6 +1607,8 @@ meta_screen_update_workspace_layout (MetaScreen *screen)
break;
}
}
else
screen->starting_corner = META_SCREEN_TOPLEFT;
}
else
{

View File

@ -5200,23 +5200,11 @@ recalc_window_type (MetaWindow *window)
static void
set_allowed_actions_hint (MetaWindow *window)
{
#define MAX_N_ACTIONS 8
#define MAX_N_ACTIONS 10
unsigned long data[MAX_N_ACTIONS];
int i;
i = 0;
if (window->has_close_func)
{
data[i] = window->display->atom_net_wm_action_close;
++i;
}
if (window->has_minimize_func)
{
data[i] = window->display->atom_net_wm_action_maximize_horz;
++i;
data[i] = window->display->atom_net_wm_action_maximize_vert;
++i;
}
if (window->has_move_func)
{
data[i] = window->display->atom_net_wm_action_move;
@ -5225,6 +5213,12 @@ set_allowed_actions_hint (MetaWindow *window)
if (window->has_resize_func)
{
data[i] = window->display->atom_net_wm_action_resize;
data[i] = window->display->atom_net_wm_action_fullscreen;
++i;
}
if (window->has_minimize_func)
{
data[i] = window->display->atom_net_wm_action_minimize;
++i;
}
if (window->has_shade_func)
@ -5232,15 +5226,24 @@ set_allowed_actions_hint (MetaWindow *window)
data[i] = window->display->atom_net_wm_action_shade;
++i;
}
if (!window->always_sticky)
/* sticky according to EWMH is different from metacity's sticky;
* metacity doesn't support EWMH sticky
*/
if (window->has_maximize_func)
{
data[i] = window->display->atom_net_wm_action_stick;
data[i] = window->display->atom_net_wm_action_maximize_horz;
++i;
data[i] = window->display->atom_net_wm_action_maximize_vert;
++i;
}
/* We always allow this */
data[i] = window->display->atom_net_wm_action_change_desktop;
++i;
if (window->has_close_func)
{
data[i] = window->display->atom_net_wm_action_close;
++i;
}
g_assert (i <= MAX_N_ACTIONS);