summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Adams <readams@readams.net>2003-11-17 00:06:58 +0000
committerRob Adams <readams@src.gnome.org>2003-11-17 00:06:58 +0000
commit9378a4fb4daac324abe01f0065c07c3ce3ce6812 (patch)
tree1e705011ff56ea55a326f0a125d20b3e1a857f30
parent67c36f09176d1282d6a197a163ce9fcd8eb59eb7 (diff)
downloadmetacity-9378a4fb4daac324abe01f0065c07c3ce3ce6812.tar.gz
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.
-rw-r--r--COMPLIANCE149
-rw-r--r--ChangeLog16
-rw-r--r--src/display.c6
-rw-r--r--src/display.h2
-rw-r--r--src/screen.c25
-rw-r--r--src/window.c35
6 files changed, 214 insertions, 19 deletions
diff --git a/COMPLIANCE b/COMPLIANCE
new file mode 100644
index 00000000..11ebcda7
--- /dev/null
+++ b/COMPLIANCE
@@ -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 \ No newline at end of file
diff --git a/ChangeLog b/ChangeLog
index 18098d85..332faf7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
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
make sure a window is really on a workspace before inserting it at
the beginning of the MRU list. Maybe there's a race condition
diff --git a/src/display.c b/src/display.c
index e4705343..3a032d78 100644
--- a/src/display.c
+++ b/src/display.c
@@ -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);
diff --git a/src/display.h b/src/display.h
index 7513f14d..a09d37c8 100644
--- a/src/display.h
+++ b/src/display.h
@@ -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;
diff --git a/src/screen.c b/src/screen.c
index 18647d3a..fdc31736 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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
{
diff --git a/src/window.c b/src/window.c
index ebf533eb..137207e3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -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);