From 4be26015c190edd919a06d25a9ef54d89897cf57 Mon Sep 17 00:00:00 2001 From: jools Date: Wed, 23 Aug 2000 17:07:14 +0000 Subject: updated Window Movement section. mainly --- wm-spec/wm-spec.sgml | 117 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 108 insertions(+), 9 deletions(-) diff --git a/wm-spec/wm-spec.sgml b/wm-spec/wm-spec.sgml index 172f14b..5faee31 100644 --- a/wm-spec/wm-spec.sgml +++ b/wm-spec/wm-spec.sgml @@ -10,7 +10,7 @@ Version -This spec is version 1.0pre1. +This spec is version 1.0pre2. @@ -42,6 +42,17 @@ explicitly modifies the ICCCM Window Managers and Clients MUST fulfil these modifications. + + Changes since 1.0pre1 + + +Removed implementation note concerning Gnome's (potential) file manager behaviour. + + +The Window Movement section of the implementation notes has been revised. + + + Changes since 1.9f @@ -703,9 +714,6 @@ managing lots of small shaped windows. The file manager draws the background on this window. There should be a root property with a window handle for use in applications that want to draw the background (xearth). - -Several GNOME file manager developers have accepted this model - Implementing enhanced support for application transient windows @@ -738,13 +746,104 @@ unlikely to break anything, it seems reasonable to document it as standard. Window Movement -According to the ICCCM, applications should not see unnecessary differences -between running with or without a window manager. Therefore window movements -for already mapped windows, such as ones requested by XMoveWindow(Display, -Window, X, Y) have to move the window Window to the coordinates (X, Y) and not -cause the window's window manager frame window to end up at (X, Y). +Window manager implementors should refer to the ICCCM for definitive +specifications of how to handle MapRequest and ConfigureRequest events. +However, since these aspects of the ICCCM are easily misread, this +document offers the following clarifications: + + +Window managers MUST honour the win_gravity field of WM_NORMAL_HINTS + for both MapRequest _and_ ConfigureRequest events [1] + + +Applications are free to change their win_gravity setting at any time + + +If application changes its gravity then Window manager should adjust the +reference point, so that client window will not move as the result. +For example if client's gravity was NorthWestGravity and reference point +was +at the top-left corner of the frame window, then after change of gravity to +the SouthEast reference point should be adjusted to point to the +lower-right +corner of the frame. + + +When generating synthetic ConfigureNotify events, the position given + MUST be the top-left corner of the client window in relation to the + origin of the root window (i.e., ignoring win_gravity) [2] + + +XMoveWindow( w, x, y) behaviour depends on the window gravity: + + +StaticGravity: + + + window's left top corner will be placed at (x,y) + + +NorthWestGravity: + + + window frame's left top corner will be placed at (x,y) + + +NorthEastGravity: + + + window frame's right top corner will be placed at (x,y) + + +SouthWestGravity: + + + window frame's left bottom corner will be placed at (x,y) + + + +SouthEastGravity: + + + window frame's right bottom corner will be placed at (x,y) + + + +CenterGravity: + + + window frame's center will be placed at (x,y) + + + +(x,y) will become a new "reference point" for the client window. + + +Implementation Note for Application developers: + + +When client window is resized - its reference point does not move. +So for example if window has SouthEastGravity and it is resized - +the bottom-right corner of its frame will not move but instead +top-left corner will be adjusted by the difference in size. + + +Implementation Note for WM developers : + + +when calculating reference point at the time of initial placement - +initial window's width should be taken into consideration, as if it +was the frame for this window. + + + +[1] ICCCM Version 2.0, §4.1.2.3 and §4.1.5 + + +[2] ICCCM Version 2.0, §4.2.3 + Window-in-Window MDI -- cgit v1.2.3-70-g09d2