From: Ben Hutchings Date: Sat, 4 Aug 2007 23:10:56 +0000 (+0000) Subject: [svn-upgrade] Integrating new upstream version, ion3 (20070720) X-Git-Tag: 20070720 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=799a98b5f970cc5b09cd572f293b6ab7ac6854fc;p=ion3.git [svn-upgrade] Integrating new upstream version, ion3 (20070720) --- diff --git a/ChangeLog b/ChangeLog index 84001f6..08e0dbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2007-07-20 13:55 UTC Tuomo Valkonen + tagged ion-3rc-20070720 + +2007-07-20 13:55 UTC Tuomo Valkonen + * 'Release notes + +2007-07-16 12:25 UTC Tuomo Valkonen + * The dock uses WMPlex size policies now + +2007-07-14 20:32 UTC Tuomo Valkonen + * Added 'orientation' winprop + +2007-07-14 20:07 UTC Tuomo Valkonen + * Some REGION_SKIP_FOCUS flag management + +2007-07-12 18:56 UTC Tuomo Valkonen + * Oops, wrong return value test for XTextPropertyToStringList + 2007-07-08 09:36 UTC Tuomo Valkonen tagged ion-3rc-20070708 diff --git a/RELNOTES b/RELNOTES index 468a6c4..b3b011f 100644 --- a/RELNOTES +++ b/RELNOTES @@ -1,4 +1,11 @@ +ion-3rc-20070720 +---------------- + +This fourth "rc" release fixes some minor bugs and omissions in +the previous release. + + ion-3rc-20070708 ---------------- diff --git a/doc/ChangeLog b/doc/ChangeLog index 8f8ab99..d674b1c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2007-07-14 21:59 UTC Tuomo Valkonen + * Removed obsolete TODO note + +2007-07-14 20:34 UTC Tuomo Valkonen + * Documented orientation winprop + 2007-07-08 09:38 UTC Tuomo Valkonen tagged ion-doc-3rc-20070708 diff --git a/doc/conf-winprops.tex b/doc/conf-winprops.tex index e5e0133..db70e5f 100644 --- a/doc/conf-winprops.tex +++ b/doc/conf-winprops.tex @@ -91,6 +91,14 @@ usual method of identifying windows, and how to obtain this information. \end{winprop} +\begin{winprop}{orientation}{string} + \index{orientation@\var{orientation}} + The orientation of the window: one of \codestr{vertical} or + \codestr{horizontal}. This is only useful when using the + window as a status display. +\end{winprop} + + \begin{winprop}{statusbar}{string} \index{statusbar@\var{statusbar}} Put the window in the statusbar, in the named tray component, diff --git a/doc/exact-version b/doc/exact-version index 82d7222..d4a6d43 100644 --- a/doc/exact-version +++ b/doc/exact-version @@ -1,5 +1,11 @@ Context: +[Removed obsolete TODO note +Tuomo Valkonen **20070714215925] + +[Documented orientation winprop +Tuomo Valkonen **20070714203400] + [TAG ion-doc-3rc-20070708 Tuomo Valkonen **20070708093830] diff --git a/doc/ionconf.dvi.gz b/doc/ionconf.dvi.gz index 0df24ca..7518f10 100644 Binary files a/doc/ionconf.dvi.gz and b/doc/ionconf.dvi.gz differ diff --git a/doc/ionconf.out b/doc/ionconf.out index 385ef4f..a8fb3c0 100644 --- a/doc/ionconf.out +++ b/doc/ionconf.out @@ -47,7 +47,7 @@ \BOOKMARK [2][-]{subsection.5.2.1}{ Direct object references}{section.5.2} \BOOKMARK [2][-]{subsection.5.2.2}{ Name-based lookups}{section.5.2} \BOOKMARK [1][-]{section.5.3}{ Alternative winprop selection criteria}{chapter.5} -\BOOKMARK [1][-]{lstlisting.5.-266}{ Writing !ion-statusd! monitors}{chapter.5} +\BOOKMARK [1][-]{lstlisting.5.-267}{ Writing !ion-statusd! monitors}{chapter.5} \BOOKMARK [0][-]{chapter.6}{ Function reference}{} \BOOKMARK [1][-]{section.6.1}{ Functions defined in ioncore}{chapter.6} \BOOKMARK [2][-]{subsection.6.1.1}{ WClientWin functions}{section.6.1} diff --git a/doc/ionconf.ps.gz b/doc/ionconf.ps.gz index 514517f..51d19e7 100644 Binary files a/doc/ionconf.ps.gz and b/doc/ionconf.ps.gz differ diff --git a/doc/ionconf.tex b/doc/ionconf.tex index a71ba17..177fe45 100644 --- a/doc/ionconf.tex +++ b/doc/ionconf.tex @@ -10,7 +10,7 @@ \title{Configuring and extending Ion3 with Lua} \author{Tuomo Valkonen \\ tuomov at iki.fi} -\date{2007-07-08} +\date{2007-07-20} \makeindex diff --git a/doc/ionconf/images.log b/doc/ionconf/images.log index 9d415fb..079e0c0 100644 --- a/doc/ionconf/images.log +++ b/doc/ionconf/images.log @@ -1,4 +1,4 @@ -This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=latex 2007.4.8) 8 JUL 2007 12:40 +This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=latex 2007.4.8) 20 JUL 2007 16:59 entering extended mode **./images.tex (./images.tex @@ -364,22 +364,22 @@ l2hSize :tex2html_wrap_inline1059:7.48248pt::0.0pt::48.86426pt. ] -l2hSize :tex2html_wrap_inline2241:8.7125pt::8.7125pt::23.6642pt. +l2hSize :tex2html_wrap_inline2259:8.7125pt::8.7125pt::23.6642pt. [3 ] -l2hSize :tex2html_wrap_inline5516:7.5626pt::7.5626pt::14.53923pt. +l2hSize :tex2html_wrap_inline5534:7.5626pt::7.5626pt::14.53923pt. [4 ] -l2hSize :tex2html_wrap_inline5518:7.5626pt::7.5626pt::14.53923pt. +l2hSize :tex2html_wrap_inline5536:7.5626pt::7.5626pt::14.53923pt. [5 ] -l2hSize :tex2html_wrap_inline7768:8.7125pt::8.7125pt::86.9574pt. +l2hSize :tex2html_wrap_inline7786:8.7125pt::8.7125pt::86.9574pt. [6 diff --git a/doc/ionconf/images.tex b/doc/ionconf/images.tex index 75709b4..6e1ef45 100644 --- a/doc/ionconf/images.tex +++ b/doc/ionconf/images.tex @@ -82,7 +82,7 @@ \title{Configuring and extending Ion3 with Lua} \author{Tuomo Valkonen \\tuomov at iki.fi} -\date{2007-07-08} +\date{2007-07-20} \makeindex @@ -301,7 +301,7 @@ $N=1{\ldots} 5$% \stepcounter{subsection} \stepcounter{subsection} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline2241}% +\lthtmlinlinemathA{tex2html_wrap_inline2259}% $(0, 1]$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} @@ -325,13 +325,13 @@ $(0, 1]$% \stepcounter{subsection} \stepcounter{subsection} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline5516}% +\lthtmlinlinemathA{tex2html_wrap_inline5534}% $-1$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline5518}% +\lthtmlinlinemathA{tex2html_wrap_inline5536}% $-2$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} @@ -361,7 +361,7 @@ $-2$% \stepcounter{section} \stepcounter{subsection} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline7768}% +\lthtmlinlinemathA{tex2html_wrap_inline7786}% $\{t,m,b\}\times\{t,c,b\}$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} diff --git a/doc/ionconf/index.html b/doc/ionconf/index.html index 7f97e0f..beebfd3 100644 --- a/doc/ionconf/index.html +++ b/doc/ionconf/index.html @@ -57,7 +57,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

Tuomo Valkonen

tuomov at iki.fi

-

2007-07-08

+

2007-07-20

diff --git a/doc/ionconf/ionconf.html b/doc/ionconf/ionconf.html index 7f97e0f..beebfd3 100644 --- a/doc/ionconf/ionconf.html +++ b/doc/ionconf/ionconf.html @@ -57,7 +57,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

Tuomo Valkonen

tuomov at iki.fi

-

2007-07-08

+

2007-07-20

diff --git a/doc/ionconf/node11.html b/doc/ionconf/node11.html index d529fb6..4fd7b9a 100644 --- a/doc/ionconf/node11.html +++ b/doc/ionconf/node11.html @@ -58,73 +58,73 @@ original version by: Nikos Drakos, CBLU, University of Leeds Index


acrobatic - : 3.5 + : 3.5
Alt : 3.3.5
AnyModifier : 3.3.5
resizeinc - : 3.5.1 - | 3.5.1 + : 3.5.1 + | 3.5.1
Button-n : 3.3.6
class
-
winprop : 3.5.2 +
winprop : 3.5.2
clientwin_do_manage_alt - : 6.9 + : 6.9
clientwin_mapped_hook - : 6.9 + : 6.9
clientwin_property_change_hook - : 6.9 + : 6.9
clientwin_unmapped_hook - : 6.9 + : 6.9
Control : 3.3.5
defmenu : 3.4.1
drawing engine - : 4.1 + : 4.1
ETCDIR : 3.1
float - : 3.5 + : 3.5
frame_managed_changed_hook - : 6.9 + : 6.9
fullscreen - : 3.5 + : 3.5
ignore_resizeinc - : 3.5.1 - | 3.5.1 + : 3.5.1 + | 3.5.1
ignore_cfgrq - : 3.5 + : 3.5
ignore_max_size - : 3.5.1 + : 3.5.1
ignore_min_size - : 3.5.1 + : 3.5.1
ignore_net_active_window - : 3.5 + : 3.5
instance
-
winprop : 3.5.2 +
winprop : 3.5.2
ioncore_deinit_hook - : 6.9 + : 6.9
ioncore_post_layout_setup_hook - : 6.9 + : 6.9
ioncore_sigchld_hook - : 6.9 + : 6.9
ioncore_snapshot_hook - : 6.9 + : 6.9
ioncore_submap_ungrab_hook - : 6.9 + : 6.9
is_dockapp
-
winprop : 3.5.2 +
winprop : 3.5.2
is_transient
-
winprop : 3.5.2 +
winprop : 3.5.2
jumpto - : 3.5 + : 3.5
keysymdef.h : 3.3.5
Lock @@ -132,36 +132,38 @@ Index
manager : 2.2.2.1
max_size - : 3.5.1 + : 3.5.1
menuentry : 3.4.1
menus : 3.4.1
min_size - : 3.5.1 + : 3.5.1
ModN : 3.3.5
name
-
winprop : 3.5.2 +
winprop : 3.5.2
new_group - : 3.5 + : 3.5
NumLock : 3.3.5
Obj : 2.2.1
oneshot - : 3.5 + : 3.5 +
orientation + : 3.5
parent : 2.2.2.1
PREFIX : 3.1
region_do_warp_alt - : 6.9 + : 6.9
region_notify_hook - : 6.9 + : 6.9
role
-
winprop : 3.5.2 +
winprop : 3.5.2
root window : 2.2.1 @@ -170,35 +172,35 @@ Index
X : 2.2.1
screen_managed_changed_hook - : 6.9 + : 6.9
ScrollLock : 3.3.5
Shift : 3.3.5
statusbar - : 3.5 + : 3.5
style - : 4.1 + : 4.1
submenu : 3.4.1
substyle - : 4.1 + : 4.1
switchto - : 3.5 + : 3.5
system.mk : 3.1
target - : 3.5 + : 3.5
tiling_placement_alt - : 6.9 + : 6.9
transient - : 3.5.3 + : 3.5.3
transient_mode - : 3.5 + : 3.5
transparent - : 3.5 + : 3.5
userpos - : 3.5.1 + : 3.5.1
WClientWin : 2.2.1
WEdln @@ -234,7 +236,7 @@ Index
xmodmap : 3.3.5
xprop - : 3.5.3 + : 3.5.3 diff --git a/doc/ionconf/node13.html b/doc/ionconf/node13.html index dd529eb..e4ff2c1 100644 --- a/doc/ionconf/node13.html +++ b/doc/ionconf/node13.html @@ -70,7 +70,7 @@ Mathematics Department, Macquarie University, Sydney. The command line arguments were:
latex2html -show_section_numbers -short_index -local_icons -noaddress -up_url http://iki.fi/tuomov/ion/ -up_title 'Ion homepage' -nofootnode -split 3 ionconf

-The translation was initiated by tuomov on 2007-07-08 +The translation was initiated by tuomov on 2007-07-20


diff --git a/doc/ionconf/node4.html b/doc/ionconf/node4.html index 4eaa00e..f041fdf 100644 --- a/doc/ionconf/node4.html +++ b/doc/ionconf/node4.html @@ -905,7 +905,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Set this to true for Acrobat Reader. It has an annoying habit of trying to manage its dialogs instead of setting them as transients and letting the window manager do its job, causing @@ -923,7 +923,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Set this to open the window in a floating frame, when in a group. @@ -938,7 +938,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Should the window be initially in full screen mode?
@@ -952,7 +952,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Should configure requests on the window be ignored? Only has effect on floating windows. @@ -967,7 +967,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Ignore extended WM hints _NET_ACTIVE_WINDOW request.
@@ -981,7 +981,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Should a newly created client window always be made active, even if the allocated frame isn't. @@ -996,7 +996,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
If the region specified by target winprop does not exist (or that winprop is not set), create a new workspace using the previously stored layout (see ioncore.deflayout) named by @@ -1015,12 +1015,28 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Discard this winprop after first use.
+

+ +

+
Winprop:
+
orientation (string) + +
+
Description:
+
+ The orientation of the window: one of `vertical' or + `horizontal'. This is only useful when using the + window as a status display. + +
+
+

@@ -1029,7 +1045,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Put the window in the statusbar, in the named tray component, (The default tray component is called simply `systray', and others you give names to in your custom template, always @@ -1046,7 +1062,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Should a newly mapped client window be switched to within its frame. @@ -1061,7 +1077,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
The name of an object (workspace, frame) that should manage windows of this type. See also new_group. @@ -1076,7 +1092,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
`normal': No change in behaviour. `current': The window should be thought of as a transient for the current active client window (if any) even if it is not marked as a @@ -1095,7 +1111,7 @@ usual method of identifying windows, and how to obtain this information.
Description:
-
+
Should frames be made transparent when this window is selected?
@@ -1110,15 +1126,15 @@ usual method of identifying windows, and how to obtain this information.

Additionally, the winprops -max_size, -min_size, -aspect, -resizeinc, +max_size, +min_size, +aspect, +resizeinc, and -ignore_max_size, -ignore_min_size, -ignore_aspect, -ignore_resizeinc, +ignore_max_size, +ignore_min_size, +ignore_aspect, +ignore_resizeinc, may be used to override application-supplied size hints. The four first ones are tables with the fields w and h, indicating the width and height size hints in pixels, and the latter ignore @@ -1126,7 +1142,7 @@ winprop is a boolean.

Finally, the boolean -userpos option may be used to +userpos option may be used to override the USPosition flag of the size hints. Normally, when this flag is set, Ion tries to respect the supplied window position more than when it is not set. Obviously, this makes sense @@ -1142,12 +1158,12 @@ only for floating windows.

The identification information supported are -class, -role, -instance, -name, -is_transient, and -is_dockapp. +class, +role, +instance, +name, +is_transient, and +is_dockapp. It is not necessary to specify all of these fields. The first three are strings, and must exactly match the corresponding information obtained from the window's properties. @@ -1235,7 +1251,7 @@ can be used to list the identification information required to set winprops for a window and all the transient windows managed within it.

- + Another way to get the identification information is to use xprop. Simply run To get class and instance, simply run xprop WM_CLASS and click on the particular window of interest. The class is the latter of @@ -1244,7 +1260,7 @@ windows have this property - use the command xprop WM_ROLE. This method, however, will not work on transients.

- + So-called ``transient windows'' are usually short-lived dialogs (although some programs abuse this property) that have a parent window that they are ``transient for''. On tiled workspaces Ion displays these windows @@ -1253,7 +1269,7 @@ Unfortunately xprop is stupid and can't cope with this situation, returning the parent window's properties when the transient is clicked on. For this reason you'll have to do a little extra work to get the properties for that window.3.3 + HREF="#foot1488">3.3

Finally, it should be mentioned that too many authors these days ``forget'' to set this vital identification to anything meaningful: @@ -1503,7 +1519,7 @@ for the additional mailboxes (`*' varying). gotten rid of in the author's opinion.

-
... window.... window.3.3
There's a patch to xprop to fix this, but nothing seems to be happening with respect to including it in diff --git a/doc/ionconf/node5.html b/doc/ionconf/node5.html index b5247f6..7fe37d1 100644 --- a/doc/ionconf/node5.html +++ b/doc/ionconf/node5.html @@ -128,7 +128,7 @@ user attributes are explained in Sections 4.3.

- +
4.1 Drawing engines, style specifications and sub-styles

@@ -180,7 +180,7 @@ specified, also in the form
 attr1-attr2-...-attrn
 
-These extra attributes are called substyles +These extra attributes are called substyles and allow, for example, the state of the object to be indicated by different colour sets while keeping the interface at an abstract level and the drawing engine completely ignorant @@ -424,7 +424,7 @@ border elements and styles referred to there are explained in Figure

-

+
diff --git a/doc/ionconf/node6.html b/doc/ionconf/node6.html index 88aa9be..7baa979 100644 --- a/doc/ionconf/node6.html +++ b/doc/ionconf/node6.html @@ -126,8 +126,7 @@ the hook reference, section 6.9.

Note that many of the hooks are called in ``protected mode'' and can not -use any functions that modify Ion's internal state. TODO: More detailed -documentation when this is final. +use any functions that modify Ion's internal state.

diff --git a/doc/ionconf/node7.html b/doc/ionconf/node7.html index aa4ddce..7b2bbb9 100644 --- a/doc/ionconf/node7.html +++ b/doc/ionconf/node7.html @@ -5846,7 +5846,7 @@ Any parameters not explicitly set in conftab will be left unchanged.

-
+
Hook name:
@@ -5918,7 +5918,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -5938,7 +5938,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -5959,7 +5959,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -5980,7 +5980,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6026,7 +6026,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6047,7 +6047,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6067,7 +6067,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6088,7 +6088,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6108,7 +6108,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6128,7 +6128,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6180,7 +6180,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6201,7 +6201,7 @@ reg:attach(cwin)

-
+
Hook name:
@@ -6223,7 +6223,7 @@ reg:attach(cwin)

-
+
Hook name:
diff --git a/doc/ionnotes.dvi.gz b/doc/ionnotes.dvi.gz index 693cdf0..57010e8 100644 Binary files a/doc/ionnotes.dvi.gz and b/doc/ionnotes.dvi.gz differ diff --git a/doc/ionnotes.ps.gz b/doc/ionnotes.ps.gz index fcdc24c..825879a 100644 Binary files a/doc/ionnotes.ps.gz and b/doc/ionnotes.ps.gz differ diff --git a/doc/ionnotes/node9.html b/doc/ionnotes/node9.html index ff3be25..03f3abd 100644 --- a/doc/ionnotes/node9.html +++ b/doc/ionnotes/node9.html @@ -70,7 +70,7 @@ Mathematics Department, Macquarie University, Sydney. The command line arguments were:
latex2html -show_section_numbers -short_index -local_icons -noaddress -up_url http://iki.fi/tuomov/ion/ -up_title 'Ion homepage' -nofootnode -split 4 ionnotes

-The translation was initiated by tuomov on 2007-07-08 +The translation was initiated by tuomov on 2007-07-20


diff --git a/doc/tricks.tex b/doc/tricks.tex index 9cf86d1..b999688 100644 --- a/doc/tricks.tex +++ b/doc/tricks.tex @@ -30,10 +30,9 @@ In this example the hook handler has no parameters, but many hook handlers do. The types of parameters for each hook are listed in the hook reference, section \ref{sec:hookref}. - Note that many of the hooks are called in ``protected mode'' and can not -use any functions that modify Ion's internal state. TODO: More detailed -documentation when this is final. +use any functions that modify Ion's internal state. + \section{Referring to regions} diff --git a/exact-version b/exact-version index 912b52f..2c2a1a0 100644 --- a/exact-version +++ b/exact-version @@ -1,5 +1,5 @@ Context: -[TAG ion-3rc-20070708 -Tuomo Valkonen **20070708093638] +[TAG ion-3rc-20070720 +Tuomo Valkonen **20070720135512] diff --git a/ioncore/clientwin.c b/ioncore/clientwin.c index 35164de..01a15d3 100644 --- a/ioncore/clientwin.c +++ b/ioncore/clientwin.c @@ -121,6 +121,7 @@ static WSizePolicy get_sizepolicy_winprop(WClientWin *cwin, static void clientwin_get_winprops(WClientWin *cwin) { ExtlTab tab, tab2; + char *s; int i1, i2; tab=ioncore_get_winprop(cwin); @@ -154,13 +155,13 @@ static void clientwin_get_winprops(WClientWin *cwin) if(extl_table_is_bool_set(tab, "ignore_cfgrq")) cwin->flags|=CLIENTWIN_PROP_IGNORE_CFGRQ; -#if 0 - cwin->szplcy=get_sizepolicy_winprop(cwin, "sizepolicy", - SIZEPOLICY_DEFAULT); - cwin->transient_szplcy=get_sizepolicy_winprop(cwin, - "transient_sizepolicy", - DFLT_SZPLCY); -#endif + if(extl_table_gets_s(tab, "orientation", &s)){ + if(strcmp(s, "vertical")==0) + cwin->flags|=CLIENTWIN_PROP_O_VERT; + else if(strcmp(s, "horizontal")==0) + cwin->flags|=CLIENTWIN_PROP_O_HORIZ; + free(s); + } } @@ -1039,6 +1040,16 @@ static void clientwin_size_hints(WClientWin *cwin, WSizeHints *hints_ret) } +static int clientwin_orientation(WClientWin *cwin) +{ + return (cwin->flags&CLIENTWIN_PROP_O_VERT + ? REGION_ORIENTATION_VERTICAL + : (cwin->flags&CLIENTWIN_PROP_O_HORIZ + ? REGION_ORIENTATION_HORIZONTAL + : REGION_ORIENTATION_NONE)); +} + + /*}}}*/ @@ -1390,6 +1401,9 @@ static DynFunTab clientwin_dynfuntab[]={ {region_size_hints, clientwin_size_hints}, + + {(DynFun*)region_orientation, + (DynFun*)clientwin_orientation}, {(DynFun*)region_rqclose, (DynFun*)clientwin_rqclose}, diff --git a/ioncore/clientwin.h b/ioncore/clientwin.h index d81b11a..dfae443 100644 --- a/ioncore/clientwin.h +++ b/ioncore/clientwin.h @@ -39,7 +39,8 @@ #define CLIENTWIN_FS_RQ 0x20000 #define CLIENTWIN_UNMAP_RQ 0x40000 #define CLIENTWIN_NEED_CFGNTFY 0x80000 - +#define CLIENTWIN_PROP_O_VERT 0x100000 +#define CLIENTWIN_PROP_O_HORIZ 0x200000 DECLCLASS(WClientWin){ WRegion region; diff --git a/ioncore/group.c b/ioncore/group.c index 7d51715..ffe6c86 100644 --- a/ioncore/group.c +++ b/ioncore/group.c @@ -918,7 +918,9 @@ void group_manage_stdisp(WGroup *ws, WRegion *stdisp, STACKING_LEVEL_ON_TOP, szplcy); } - + + stdisp->flags|=REGION_SKIP_FOCUS; + fp.g=REGION_GEOM(ws); sizepolicy(&ws->managed_stdisp->szplcy, stdisp, NULL, 0, &fp); diff --git a/ioncore/infowin.c b/ioncore/infowin.c index d23823e..791cae0 100644 --- a/ioncore/infowin.c +++ b/ioncore/infowin.c @@ -51,8 +51,6 @@ bool infowin_init(WInfoWin *p, WWindow *parent, const WFitParams *fp, if(p->brush==NULL) goto fail3; - p->wwin.region.flags|=REGION_SKIP_FOCUS; - /* Enable save unders */ attr.save_under=True; XChangeWindowAttributes(ioncore_g.dpy, p->wwin.win, CWSaveUnder, &attr); diff --git a/ioncore/mplex.c b/ioncore/mplex.c index 0139176..1d5109f 100644 --- a/ioncore/mplex.c +++ b/ioncore/mplex.c @@ -505,6 +505,27 @@ static void mplex_managed_rqgeom(WMPlex *mplex, WRegion *sub, } +void mplex_set_szplcy(WMPlex *mplex, WRegion *sub, WSizePolicy szplcy) +{ + WStacking *node; + + node=mplex_find_stacking(mplex, sub); + + if(node!=NULL) + node->szplcy=szplcy; +} + + +WSizePolicy mplex_get_szplcy(WMPlex *mplex, WRegion *sub) +{ + WStacking *node; + + node=mplex_find_stacking(mplex, sub); + + return (node==NULL ? SIZEPOLICY_DEFAULT : node->szplcy); +} + + /*}}}*/ @@ -1280,6 +1301,9 @@ bool mplex_do_attach_final(WMPlex *mplex, WRegion *reg, WMPlexPHolder *ph) region_set_manager(reg, (WRegion*)mplex); + if(param->flags&MPLEX_ATTACH_PASSIVE) + reg->flags|=REGION_SKIP_FOCUS; + if(!(param->flags&MPLEX_ATTACH_WHATEVER)){ WFitParams fp; @@ -1407,6 +1431,9 @@ static void get_params(WMPlex *mplex, ExtlTab tab, int mask, if(extl_table_is_bool_set(tab, "hidden")) par->flags|=MPLEX_ATTACH_HIDDEN&ok; + if(extl_table_is_bool_set(tab, "passive")) + par->flags|=MPLEX_ATTACH_PASSIVE&ok; + if(extl_table_is_bool_set(tab, "pseudomodal")) par->flags|=MPLEX_ATTACH_PSEUDOMODAL&ok; @@ -1488,6 +1515,7 @@ WRegion *mplex_attach_new_(WMPlex *mplex, WMPlexAttachParams *par, * \var{hidden} & (boolean) Attach hidden, if not prevented * by e.g. the mutually exclusive list being empty. * This option overrides \var{switchto}. \\ + * \var{passive} & (boolean) Skip in certain focusing operations. \\ * \var{pseudomodal} & (boolean) The attached region is ``pseudomodal'' * if the stacking level dictates it to be modal. * This means that the region may be hidden to display diff --git a/ioncore/mplex.h b/ioncore/mplex.h index 455c75b..7bc833f 100644 --- a/ioncore/mplex.h +++ b/ioncore/mplex.h @@ -36,6 +36,7 @@ #define MPLEX_ATTACH_SIZEPOLICY 0x0040 /* size policy field is set */ #define MPLEX_ATTACH_INDEX 0x0080 /* index field is set */ #define MPLEX_ATTACH_WHATEVER 0x0100 /* set REGION_FIT_WHATEVER */ +#define MPLEX_ATTACH_PASSIVE 0x0200 /* sets SKIP_FOCUS */ enum{ @@ -184,6 +185,12 @@ extern void mplex_call_changed_hook(WMPlex *mplex, WHook *hook, extern void mplex_remanage_stdisp(WMPlex *mplex); +/* Note: only the size policy field is changed; actual geometry is not + * yet changed. + */ +extern void mplex_set_szplcy(WMPlex *mplex, WRegion *sub, WSizePolicy szplcy); +extern WSizePolicy mplex_get_szplcy(WMPlex *mplex, WRegion *sub); + /* Dynfuns */ DYNFUN void mplex_managed_geom(const WMPlex *mplex, WRectangle *geom); diff --git a/ioncore/property.c b/ioncore/property.c index d142fad..84aad61 100644 --- a/ioncore/property.c +++ b/ioncore/property.c @@ -191,7 +191,7 @@ char **xwindow_get_text_property(Window win, Atom a, int *nret) if(!ioncore_g.use_mb){ Status st=XTextPropertyToStringList(&prop, &list, &n); - ok=(st==0); + ok=(st!=0); }else{ int st=XmbTextPropertyToTextList(ioncore_g.dpy, &prop, &list, &n); ok=(st>=0); diff --git a/ioncore/region.c b/ioncore/region.c index ebec9e7..aaec0f0 100644 --- a/ioncore/region.c +++ b/ioncore/region.c @@ -596,6 +596,9 @@ void region_unset_manager(WRegion *reg, WRegion *mgr) reg->manager=NULL; + /* Reset status, as it is set by manager */ + reg->flags&=~REGION_SKIP_FOCUS; + if(region_is_activity_r(reg)) region_clear_mgd_activity(mgr); diff --git a/ioncore/screen-notify.c b/ioncore/screen-notify.c index add918d..30e0c97 100644 --- a/ioncore/screen-notify.c +++ b/ioncore/screen-notify.c @@ -41,7 +41,8 @@ static WInfoWin *do_get_notifywin(WScreen *scr, Watch *watch, uint pos, param.flags=(MPLEX_ATTACH_UNNUMBERED| MPLEX_ATTACH_SIZEPOLICY| MPLEX_ATTACH_GEOM| - MPLEX_ATTACH_LEVEL); + MPLEX_ATTACH_LEVEL| + MPLEX_ATTACH_PASSIVE); param.level=STACKING_LEVEL_ON_TOP; param.geom.x=0; diff --git a/mod_dock/dock.c b/mod_dock/dock.c index dabe075..63e9117 100644 --- a/mod_dock/dock.c +++ b/mod_dock/dock.c @@ -611,34 +611,6 @@ static void dock_arrange_dockapps(WDock *dock, const WRectangle *bd_dockg, } -static void calc_dock_pos(WRectangle *dg, const WRectangle *pg, int pos) -{ - switch(pos&DOCK_HPOS_MASK){ - case DOCK_HPOS_LEFT: - dg->x=pg->x; - break; - case DOCK_HPOS_CENTER: - dg->x=pg->x+(pg->w-dg->w)/2; - break; - case DOCK_HPOS_RIGHT: - dg->x=pg->x+(pg->w-dg->w); - break; - } - - switch(pos&DOCK_VPOS_MASK){ - case DOCK_VPOS_TOP: - dg->y=pg->y; - break; - case DOCK_VPOS_MIDDLE: - dg->y=pg->y+(pg->h-dg->h)/2; - break; - case DOCK_VPOS_BOTTOM: - dg->y=pg->y+(pg->h-dg->h); - break; - } -} - - static void dock_set_minmax(WDock *dock, int grow, const WRectangle *g) { dock->min_w=g->w; @@ -799,11 +771,12 @@ static void dock_managed_rqgeom_(WDock *dock, WRegion *reg, int flags, dock_geom.w=tile_size.w; dock_geom.h=tile_size.h; } + + border_dock_geom.x=REGION_GEOM(dock).x; + border_dock_geom.y=REGION_GEOM(dock).y; border_dock_geom.w=dock_bdw.left+dock_geom.w+dock_bdw.right; border_dock_geom.h=dock_bdw.top+dock_geom.h+dock_bdw.bottom; - calc_dock_pos(&border_dock_geom, &parent_geom, pos); - /* Fit dock to new geom if required */ if(!(flags®ION_RQGEOM_TRYONLY)){ WRQGeomParams rq=RQGEOMPARAMS_INIT; @@ -991,6 +964,29 @@ static void mplexpos(int pos, int *mpos) else *mpos=p; } + + +static void mplexszplcy(int pos, WSizePolicy *szplcy) +{ + int hp=pos&DOCK_HPOS_MASK, vp=pos&DOCK_VPOS_MASK; + WSizePolicy p; + + p=(vp!=DOCK_VPOS_MIDDLE + ? (vp==DOCK_VPOS_TOP + ? (hp!=DOCK_HPOS_CENTER + ? (hp==DOCK_HPOS_RIGHT + ? SIZEPOLICY_GRAVITY_NORTHEAST + : SIZEPOLICY_GRAVITY_NORTHWEST) + : SIZEPOLICY_GRAVITY_NORTH) + : (hp!=DOCK_HPOS_CENTER + ? (hp==DOCK_HPOS_RIGHT + ? SIZEPOLICY_GRAVITY_SOUTHEAST + : SIZEPOLICY_GRAVITY_SOUTHWEST) + : SIZEPOLICY_GRAVITY_SOUTH)) + : SIZEPOLICY_GRAVITY_CENTER); + + *szplcy=p; +} static void dock_do_set(WDock *dock, ExtlTab conftab, bool resize) @@ -1036,6 +1032,10 @@ static void dock_do_set(WDock *dock, ExtlTab conftab, bool resize) dock_managed_rqgeom_(dock, NULL, 0, NULL, NULL, TRUE); } mplex_set_stdisp(par, (WRegion*)dock, &din); + }else if((WRegion*)par==REGION_MANAGER(dock)){ + WSizePolicy szplcy; + mplexszplcy(dock->pos, &szplcy); + mplex_set_szplcy(par, (WRegion*)dock, szplcy); } } @@ -1124,8 +1124,6 @@ static bool dock_init(WDock *dock, WWindow *parent, const WFitParams *fp) region_add_bindmap((WRegion*)dock, dock_bindmap); - ((WRegion*)dock)->flags|=REGION_SKIP_FOCUS; - window_select_input(&(dock->win), IONCORE_EVENTMASK_CWINMGR); dock_brush_get(dock); @@ -1165,6 +1163,7 @@ WDock *mod_dock_create(ExtlTab tab) WDock *dock=NULL; WRegion *stdisp=NULL; WMPlexSTDispInfo din; + WFitParams fp; if(extl_table_gets_s(tab, "mode", &mode)){ if(strcmp(mode, "floating")==0){ @@ -1202,62 +1201,53 @@ WDock *mod_dock_create(ExtlTab tab) } /* Create the dock */ - - if(floating){ - WMPlexAttachParams par; - - par.flags=(MPLEX_ATTACH_UNNUMBERED - |MPLEX_ATTACH_SIZEPOLICY - |MPLEX_ATTACH_GEOM); - - par.szplcy=SIZEPOLICY_FREE; - par.geom.x=0; - par.geom.y=0; - par.geom.w=1; - par.geom.h=1; - - if(extl_table_is_bool_set(tab, "floating_hidden")) - par.flags|=MPLEX_ATTACH_HIDDEN; - - dock=(WDock*)mplex_do_attach_new((WMPlex*)screen, &par, - (WRegionCreateFn*)create_dock, - NULL); - }else{ - WFitParams fp; - - fp.mode=REGION_FIT_BOUNDS|REGION_FIT_WHATEVER; - fp.g.x=0; - fp.g.y=0; - fp.g.w=1; - fp.g.h=1; + fp.mode=REGION_FIT_BOUNDS|REGION_FIT_WHATEVER; + fp.g.x=0; + fp.g.y=0; + fp.g.w=1; + fp.g.h=1; - dock=create_dock((WWindow*)screen, &fp); - } + dock=create_dock((WWindow*)screen, &fp); if(dock==NULL){ warn("Failed to create dock."); return NULL; } + /* Get parameters */ dock->save=FALSE; dock_do_set(dock, tab, FALSE); + /* Calculate min/max size */ + dock_managed_rqgeom_(dock, NULL, 0, NULL, NULL, TRUE); + /* Final setup */ if(floating){ - WRQGeomParams rq=RQGEOMPARAMS_INIT; const WRectangle *pg=®ION_GEOM(screen); + WMPlexAttachParams par=MPLEXATTACHPARAMS_INIT; + WRegionAttachData data; - /* Just calculate real min/max size */ - dock_managed_rqgeom_(dock, NULL, 0, NULL, NULL, TRUE); + par.flags=(MPLEX_ATTACH_UNNUMBERED + |MPLEX_ATTACH_SIZEPOLICY + |MPLEX_ATTACH_GEOM + |MPLEX_ATTACH_PASSIVE); - rq.geom.w=minof(dock->min_w, pg->w); - rq.geom.h=minof(dock->min_h, pg->h); - calc_dock_pos(&rq.geom, pg, dock->pos); + par.geom.w=dock->min_w; + par.geom.h=dock->min_h; + par.geom.x=0; + par.geom.y=0; - region_rqgeom((WRegion*)dock, &rq, NULL); + mplexszplcy(dock->pos, &par.szplcy); - return dock; + if(extl_table_is_bool_set(tab, "floating_hidden")) + par.flags|=MPLEX_ATTACH_HIDDEN; + + data.type=REGION_ATTACH_REPARENT; + data.u.reg=(WRegion*)dock; + + if(mplex_do_attach((WMPlex*)screen, &par, &data)) + return dock; }else{ mplexpos(dock->pos, &din.pos); din.fullsize=FALSE; /* not supported */ diff --git a/mod_statusbar/statusbar.c b/mod_statusbar/statusbar.c index e4adc77..c43d2b0 100644 --- a/mod_statusbar/statusbar.c +++ b/mod_statusbar/statusbar.c @@ -76,8 +76,6 @@ bool statusbar_init(WStatusBar *p, WWindow *parent, const WFitParams *fp) region_add_bindmap((WRegion*)p, mod_statusbar_statusbar_bindmap); - ((WRegion*)p)->flags|=REGION_SKIP_FOCUS; - LINK_ITEM(statusbars, p, sb_next, sb_prev); return TRUE; diff --git a/mod_tiling/panehandle.c b/mod_tiling/panehandle.c index 4321d3c..fae133e 100644 --- a/mod_tiling/panehandle.c +++ b/mod_tiling/panehandle.c @@ -49,8 +49,6 @@ bool panehandle_init(WPaneHandle *pwin, WWindow *parent, const WFitParams *fp) if(!window_init(&(pwin->wwin), parent, fp)) return FALSE; - ((WRegion*)pwin)->flags|=REGION_SKIP_FOCUS; - panehandle_getbrush(pwin); if(pwin->brush==NULL){ diff --git a/mod_tiling/splitfloat.c b/mod_tiling/splitfloat.c index d746061..bc1abb6 100644 --- a/mod_tiling/splitfloat.c +++ b/mod_tiling/splitfloat.c @@ -64,6 +64,9 @@ bool splitfloat_init(WSplitFloat *split, const WRectangle *geom, return FALSE; } + ((WRegion*)split->brpwin)->flags|=REGION_SKIP_FOCUS; + ((WRegion*)split->tlpwin)->flags|=REGION_SKIP_FOCUS; + if(!splitsplit_init(&(split->ssplit), geom, dir)){ destroy_obj((Obj*)split->brpwin); destroy_obj((Obj*)split->tlpwin); diff --git a/mod_tiling/tiling.c b/mod_tiling/tiling.c index 877a8a8..e3d706d 100644 --- a/mod_tiling/tiling.c +++ b/mod_tiling/tiling.c @@ -432,6 +432,8 @@ void tiling_manage_stdisp(WTiling *ws, WRegion *stdisp, tiling_unmanage_stdisp(ws, TRUE, TRUE); return; } + + stdisp->flags|=REGION_SKIP_FOCUS; dg=((WSplit*)(ws->stdispnode))->geom; diff --git a/version.h b/version.h index 1db6d78..c3670e2 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ -#define ION_VERSION "3rc-20070708" +#define ION_VERSION "3rc-20070720" #define ION_API_VERSION "3"
Figure 4.1: Sketch of different border styles and elements