From: Ben Hutchings Date: Sun, 25 Mar 2007 01:38:36 +0000 (+0000) Subject: [svn-upgrade] Integrating new upstream version, ion3 (20070318) X-Git-Tag: 20070318 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=20070318;p=ion3.git [svn-upgrade] Integrating new upstream version, ion3 (20070318) --- diff --git a/ChangeLog b/ChangeLog index d966641..ae08861 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,452 @@ +2007-03-18 20:31 UTC Tuomo Valkonen + tagged ion-3ds-20070318 + +2007-03-18 20:31 UTC Tuomo Valkonen + * Drawing fixes + +2007-03-18 20:07 UTC Tuomo Valkonen + * Release notes + +2007-03-18 17:23 UTC Tuomo Valkonen + * Style improvements + +2007-03-18 17:16 UTC Tuomo Valkonen + * Split out lookcommon stuff into multiple files + +2007-03-18 12:53 UTC Tuomo Valkonen + * query_menu duplicate name mangling fixes + +2007-03-17 19:06 UTC Tuomo Valkonen + * removed unnecessary parameter + +2007-03-17 15:00 UTC Tuomo Valkonen + * mplex_do_remanage_stdisp fixes + +2007-03-17 14:51 UTC Tuomo Valkonen + * Screen notification windows' positions are based on stdisp position now. + +2007-03-17 14:26 UTC Tuomo Valkonen + * Oops + +2007-03-17 14:16 UTC Tuomo Valkonen + * WMPlex focus restoring improvements + (Closing the scratchpad returns where the focus used to be, etc.) + +2007-03-17 13:41 UTC Tuomo Valkonen + * Improved default style + +2007-03-17 13:18 UTC Tuomo Valkonen + * Hmm... + +2007-03-17 11:09 UTC Tuomo Valkonen + * Added border_sides drawing engine option. + It controls, which sides get drawn borders. Possible values are "all", + "tb" (top and bottom), and "lr" (left and right). To further control + the drawing, use the shadow_pixels and highlight_pixels options. + +2007-03-16 20:30 UTC Tuomo Valkonen + * Changes in configuration file setup. + cfg_ion.lua simply loads cfg_defaults.lua that loads the default set of + modules and other files. This completes the obsoletion of cfg_user.lua + (still loaded by cfg_defaults.lua) as cfg_ion.lua now only needs to contain + dopath("cfg_defaults.lua") for a working setup. + +2007-03-16 20:22 UTC Tuomo Valkonen + * mod_tiling.lua stub loader defines "default" layout + +2007-03-16 07:30 UTC Tuomo Valkonen + * README fixes etc. + +2007-03-15 19:42 UTC Tuomo Valkonen + * Case-insensitive manual page completion of `caseicompl` is set. + +2007-03-15 19:40 UTC Tuomo Valkonen + * ion-completeman improvements + +2007-03-15 19:17 UTC Tuomo Valkonen + * Added WMoveresMode.rqgeom and .geom + +2007-03-15 16:24 UTC Tuomo Valkonen + * Context menu sorting hack + +2007-03-13 22:46 UTC Tuomo Valkonen + * Always defer update of screen notify and info windows + +2007-03-13 18:08 UTC Tuomo Valkonen + * Added reparent/attach failure recovery code. + (Should only be needed in very exceptional situations.) + +2007-03-13 17:15 UTC Tuomo Valkonen + * Cleaned up trivial #warning + +2007-03-13 17:14 UTC Tuomo Valkonen + * oops, ion-statusd needed some updating as well + +2007-03-11 14:59 UTC Tuomo Valkonen + * Don't defer already deferred (C-side) actions + +2007-03-10 23:08 UTC Tuomo Valkonen + * mod_sm uses `libtu_progbasename` with SM_SAVE_DIR. + Previously this was hard-coded to "ion3", and didn't work correctly as "pwm3". + +2007-03-10 23:07 UTC Tuomo Valkonen + * Libtu-related updates + +2007-03-10 22:58 UTC Tuomo Valkonen + * Oops, ion.c too + +2007-03-10 22:46 UTC Tuomo Valkonen + * frame_load wasn't using DEST_EMPTY setting of the mode + +2007-03-10 18:48 UTC Tuomo Valkonen + * Autoraise changes: + - Moved autoraise from navi code to mplex and group `managed_prepare_focus` + - Added boolean `autoraise` option to `ioncore.set`. + +2007-03-10 18:47 UTC Tuomo Valkonen + * region_prepare_focus behaviour changes: + stop recursion at active instead of mapped region. + +2007-03-10 18:30 UTC Tuomo Valkonen + * WMPlex focus code passes WStacking instead of WRegion around + +2007-03-10 18:07 UTC Tuomo Valkonen + * Oops, some settings were missing from ioncore.get. + +2007-03-10 16:42 UTC Tuomo Valkonen + * Removed remains of special-case region_get_rescue_pholder_for for WScreen. + +2007-03-10 16:42 UTC Tuomo Valkonen + * Oops, PWM needed a numeric version of ioncore_setup_display + +2007-03-10 16:08 UTC Tuomo Valkonen + * Cleanup of some marked TODO items + +2007-03-10 16:08 UTC Tuomo Valkonen + * Doc. comment improvements + +2007-03-10 14:30 UTC Tuomo Valkonen + * ignore_cfgrq winprop for Xpdf open dialog + +2007-03-08 18:09 UTC Tuomo Valkonen + * Oops, wrong flag... + +2007-03-10 13:46 UTC Tuomo Valkonen + * Fixed mkbottom geometry + +2007-03-08 17:32 UTC Tuomo Valkonen + * Year update + +2007-03-04 17:37 UTC Tuomo Valkonen + * Added mod_tiling.untile. + +2007-03-03 15:24 UTC Tuomo Valkonen + * Hmm... it compiled a few moments ago + +2007-03-03 15:23 UTC Tuomo Valkonen + * Doc. fix + +2007-03-03 15:21 UTC Tuomo Valkonen + * Added WGroup.set_bottom + +2007-03-03 14:56 UTC Tuomo Valkonen + * Removed bottom_last_close option. + If a group has a bottom, and the bottom is closed last, the group + is always to be destroyed. + +2007-03-03 14:05 UTC Tuomo Valkonen + * Cleanup (declared function no longer exists) + +2007-03-03 13:43 UTC Tuomo Valkonen + * Changes in tagging functions: + Some name were changed (to have common prefix of ioncore.tagged_), + and WMPlex.attach_tagged was removed and replaced with more generic + ioncore.tagged_attach, that also is now bound on the WGroupWS context + menu for them. + +2007-03-03 12:57 UTC Tuomo Valkonen + * Hmm... maybe that fixes irreproducible exit crashes. + +2007-03-03 12:56 UTC Tuomo Valkonen + * Moved Mod1+A attach query to WFrame.toplevel from WMPlex.toplevel. + (It doesn't make much sense on screens.) + +2007-03-02 21:58 UTC Tuomo Valkonen + * Added map and unmap to list of notified changes to regions + +2007-03-02 21:57 UTC Tuomo Valkonen + * Don't refresh on all notifies in frame_managed_notify. + +2007-03-02 16:33 UTC Tuomo Valkonen + * Size hints base size usage fixes. + +2007-03-01 21:09 UTC Tuomo Valkonen + * Don't set focus for windows that are already active when no other changes are pending. + +2007-03-01 20:55 UTC Tuomo Valkonen + * Further pointer focus hack optimisation. + Do not bother with the pointer position at all: simply block + EnterWindow event focus changes if the unmapped/destroyed + window does not or should not soon have the focus. + (The general focus policy has recently gravitated towards + always ignoring EnterWindow events if there could be any + confusion.) + +2007-03-01 15:32 UTC Tuomo Valkonen + * Removed region_goto active window optimisation to ensure warp in any case. + +2007-02-28 23:03 UTC Tuomo Valkonen + * focusbogushatehatehate#2 + +2007-02-28 22:55 UTC Tuomo Valkonen + * groupcw_managed_notify wasn't calling group_managed_notify. + This broke tracking of current region within the group. + +2007-02-28 21:51 UTC Tuomo Valkonen + * Focusbogushatehatehate + +2007-02-28 20:30 UTC Tuomo Valkonen + * Tiling frame removal focus fixes + +2007-02-28 17:12 UTC Tuomo Valkonen + * Minor pointer focus hack optimisation. + (Don't do anything if ioncore_g.focus_next is set.) + +2007-02-27 20:53 UTC Tuomo Valkonen + * group_bottom was missing EXTL_SAFE + +2007-02-26 20:43 UTC Tuomo Valkonen + * Simpler mod_query.query_attachclient handler. + (Uses WRegion.groupleader_of.) + +2007-02-26 19:31 UTC Tuomo Valkonen + * WFrame.floating bindmap is applied to transients too + +2007-02-26 16:28 UTC Tuomo Valkonen + * Activity notification display improvements (?). + +2007-02-25 22:54 UTC Tuomo Valkonen + * Improved float placement code. + All of the stacking structure for all groups is scanned, on the target + stacking level, instead of just the target group's portion on all levels. + +2007-02-25 19:45 UTC Tuomo Valkonen + * Added "userpos" winprop for overriding the USPosition size hint flag. + +2007-02-25 18:54 UTC Tuomo Valkonen + * Split out screen notification window code into scree-notify.c + +2007-02-24 18:52 UTC Tuomo Valkonen + * Added maximum width parameter to infowin_set_text. + +2007-02-24 17:59 UTC Tuomo Valkonen + * Fixed unsplit + +2007-02-24 17:37 UTC Tuomo Valkonen + * Removed mplex attach "layer" parameter backwards compatibility support + +2007-02-24 17:36 UTC Tuomo Valkonen + * Removed layout loading backwards compatibility hack + +2007-02-24 17:36 UTC Tuomo Valkonen + * And the default too.. + +2007-02-24 17:33 UTC Tuomo Valkonen + * Layout configuration file updates, clean-up and new layouts + +2007-02-24 17:20 UTC Tuomo Valkonen + * bottom_last_close is the default now + +2007-02-24 17:09 UTC Tuomo Valkonen + * Removed many specific implementations of region_may_dispose. + +2007-02-24 17:08 UTC Tuomo Valkonen + * Generic implementation of region_may_dispose. + Based on a test run of the improved rescue code. + +2007-02-24 15:22 UTC Tuomo Valkonen + * Further changes in context menu definitions. + - Less definitions for _sub, instead preferring directly defining things + in the context menu for the corresponding class. + - However, the menu entries for 'pmenus' are now not so nicely ordered. + Perhaps there should be some way to hint at the sorting... + +2007-02-24 15:22 UTC Tuomo Valkonen + * Menu API and context menu generation changes + +2007-02-23 21:07 UTC Tuomo Valkonen + * Make context menus work for empty workspaces (etc.) too + +2007-02-23 20:19 UTC Tuomo Valkonen + * Tiling initial frame creation/attach unification. + +2007-02-23 18:58 UTC Tuomo Valkonen + * Added ioncore_exec_environ_hook. + This can be used to set up the environment variables and such for + programs executed by Ion. It receives an WExecP structure as parameter, + and this includes the intended target region, so that a FDO startup + sequence specification support module could use it to set things up + for proper targeting of windows. + +2007-02-23 18:30 UTC Tuomo Valkonen + * Removed frame_style backwards compatibility support + +2007-02-23 18:28 UTC Tuomo Valkonen + * Put all windows on the focuslist menu + +2007-02-23 18:25 UTC Tuomo Valkonen + * No need for region_dispose_ (with the underscore). + +2007-02-23 16:39 UTC Tuomo Valkonen + * Working (?) detach/attach again with the help of region_disposeroot. + +2007-02-23 16:22 UTC Tuomo Valkonen + * Replaced region_managed_rqdispose with region_managed_disposeroot. + This version only returns the root region to be disposed, or NULL + if the operation can not be done. + +2007-02-23 16:14 UTC Tuomo Valkonen + * Clean-up + +2007-02-22 20:39 UTC Tuomo Valkonen + * TODO update: tiny frame problem solved by unsqueeze + +2007-02-22 20:38 UTC Tuomo Valkonen + * ioncore.set{unsqueeze=true/false} option for auto-unsqueeze. + +2007-02-22 20:32 UTC Tuomo Valkonen + * Unsqueeze transients. + (Yes, I know, there's a problem with stray frames with move in + general after other recent changes.) + +2007-02-22 20:26 UTC Tuomo Valkonen + * Unsqueeze menus/queries/messages. + +2007-02-22 20:18 UTC Tuomo Valkonen + * Added ioncore.unsqueeze + +2007-02-22 20:02 UTC Tuomo Valkonen + * Added minimum size hint for queries/messages/menus. + +2007-02-21 18:02 UTC Tuomo Valkonen + * Dispose/rqclose changes + - Dispose no longer defers actual destroy automatically, but stuff + calling it should take care of that, when needed. + - WRegion.rqclose defer dispose always, and _does not_ indicate, + whether the operation is likely to succeed. To see if this happens, + use the "deinit" notification. + +2007-02-20 20:20 UTC Tuomo Valkonen + * Move rotation setting from WScreen to mod_xrandr + +2007-02-20 02:42 UTC Tuomo Valkonen + * Improved size hint winprops + +2007-02-20 02:23 UTC Tuomo Valkonen + * Added option to disable mouse/sloppy focus. + +2007-02-20 02:18 UTC Tuomo Valkonen + * Menu update + +2007-02-20 02:14 UTC Tuomo Valkonen + * Added WRegion.get_configuration export. + Note that it filters out client windows by default. + +2007-02-19 22:45 UTC Tuomo Valkonen + * Frames weren't yet using rqdispose chains + +2007-02-19 19:33 UTC Tuomo Valkonen + * Ugly hack for dispose + (TODO: use continuations instead) + +2007-02-19 19:26 UTC Tuomo Valkonen + * Oops, xwindow_pointer_pos was returning root coordinates + +2007-02-19 19:07 UTC Tuomo Valkonen + * More ugly hacks to pointer focus hack + +2007-02-18 19:00 UTC Tuomo Valkonen + * Added missing header + +2007-02-18 19:00 UTC Tuomo Valkonen + * Renamed region_may_destroy region_may_dispose for consistency. + +2007-02-18 18:57 UTC Tuomo Valkonen + * bottom_last_close wasn't being saved + +2007-02-18 18:54 UTC Tuomo Valkonen + * Rescue mechanism optimisations + +2007-02-18 18:38 UTC Tuomo Valkonen + * No more reactive destroyal in region_managed_remove. + It must be done in the region_managed_rqdispose chain. + +2007-02-18 18:30 UTC Tuomo Valkonen + * Oops. + +2007-02-18 17:54 UTC Tuomo Valkonen + * Added region_rqdispose/region_managed_rqdispose mechanism. + This should fix the issue of it having bee possible to destroy the + last workspace (and tiling on it) on a screen recently. + +2007-02-18 17:06 UTC Tuomo Valkonen + * Dispose changes + +2007-02-17 20:47 UTC Tuomo Valkonen + * Bah, forgot the export statements, and WRegion.group_of is rather useless + actually, in its previous form (gone now). + +2007-02-17 19:46 UTC Tuomo Valkonen + * Do not ignore active region's base size in (tiled) frames' size hints. + +2007-02-17 14:19 UTC Tuomo Valkonen + * Full screen mode fixes and improvements + +2007-02-17 14:17 UTC Tuomo Valkonen + * Added WRegion.group_of and WRegion.groupleader_of exports. + +2007-02-08 16:17 UTC Tuomo Valkonen + * Mplex attach size kludges + +2007-02-08 15:25 UTC Tuomo Valkonen + * I hate focus code + +2007-02-06 19:54 UTC Tuomo Valkonen + * Added commented-out caseicompl setting to cfg_query.lua + +2007-02-06 19:30 UTC Tuomo Valkonen + * Changes in NotifyPointerRoot handling. + (Check for pending focus changes too. Moved after generic focus event handling.) + +2007-02-06 19:11 UTC Tuomo Valkonen + * Don't confine pointer by default on grab. + +2007-02-06 19:05 UTC Tuomo Valkonen + * region_maybewarp_now was ignoring ioncore_g.warp_enabled. + +2007-02-06 18:37 UTC Tuomo Valkonen + * Pointer focus hack on return from grab had been lost.. + +2007-02-05 18:23 UTC Tuomo Valkonen + * Removed stub appmenu. + F3/query_exec is the Ion way. (The appmenu remains for pwm, though.) + +2007-02-11 18:42 UTC Tuomo Valkonen + * Some menu/query cycling improvements + (partially incomplete) + +2007-02-05 17:47 UTC Tuomo Valkonen + * Close grabmenus when grab is killed (Esc). + +2007-02-04 10:35 UTC Tuomo Valkonen + * Some system.mk doc updates + +2007-02-03 20:27 UTC Tuomo Valkonen + * Removed ext_statusbar backwards compat. hack. + +2007-02-03 16:10 UTC Tuomo Valkonen + * Added missing backquote + 2007-02-03 14:50 UTC Tuomo Valkonen tagged ion-3ds-20070203 diff --git a/README b/README index 0769ba6..29fcb90 100644 --- a/README +++ b/README @@ -50,7 +50,7 @@ Building and installing if you're using some X display/login manager. If `~/.xsession` does not help and you're not using a display manager, modifying `~/.xinitrc` or creating one based on your system's `xinitrc` (wherever that may be; - use locate) may be what you need to do. Note that unlike `.xsession`, + use `locate`) may be what you need to do. Note that unlike `.xsession`, a `.xinitrc` should usually do much more setup than simply start a few programs of your choice. @@ -64,11 +64,11 @@ Some optional installation steps 1. The F5 and F6 keys expect to find the program `run-mailcap` to select a program to view a file based on its guessed MIME type. Unless you are using Debian, most likely you don't have it, but any other similar - program (or just plain old text editor) will do as well - just the bindings - in `cfg_ioncore.lua`. Of course, if you don't want to use the feature at - this time or never, you may simply skip this step. If you want to use - `run-mailcap`, it can be found from the following address, as a source - tarball as well: + program (or just plain old text editor) will do as well -- just modify the + bindings in `cfg_ioncore.lua`. Of course, if you don't want to use the + feature at this time or never, you may simply skip this step. If you want + to use `run-mailcap`, it can be found from the following address, as a + source tarball as well: @@ -122,16 +122,16 @@ The autoconf script written by Tom Payne for the most part. The dock module was written by Tom Payne and Per Olofsson. -`share/ion-completefile/ion-completefile.c` is based on editline, (c) +`utils/ion-completefile/ion-completefile.c` is based on editline, (c) 1992 Simmule Turner and Rich Salz. See the file for details. -The code that `de/fontset.c` is based on was apparently originally written -by Tomohiro Kubota; see +The code that `de/fontset.c` is based on was apparently originally +written by Tomohiro Kubota; see . -Various patches have been contributed by other individuals unlisted here. -See the mailing list archives and the darcs source repository history at -. For translators see the individual `.po` -files in `po/`. +Various (minor) patches have been contributed by other individuals +unlisted here. See the mailing list archives and the darcs source +repository history at . For translators +see the individual `.po` files in `po/`. See `libtu/README` for code by others integrated into libtu. diff --git a/RELNOTES b/RELNOTES index 0834cfa..c8621c1 100644 --- a/RELNOTES +++ b/RELNOTES @@ -1,10 +1,39 @@ +ion-3ds-20070318 +---------------- + +This may be the last "ds" release if Ion3; if all goes well, the next +release is likely to be an "rc". Some minor improvements will still +be done, and minor requests may be accepted, so be quick. + +The most notable changes in this release from the previous one are: + + * Transients and queries in too small frames are "unsqueezed" out + of them, unless disabled with `ioncore.set{ unsqueeze = false }`. + + * Some changes in default `cfg_ion.lua`: instead of loading + various other files, just `cfg_default.lua` is loaded instead. + + * `mod_tiling.untile` (available in the context menu) may be used + to decompose tilings into floating frames. (This is the approximate + opposite of `mod_tiling.mkbottom` and the "new tiling" context menu + entry.) + + * Improved context menus. + + * Slightly improved defaults style, using the drawing engine's + added possibility of partial borders. + + * Various fixes and other improvements, in particular in relation + to focus code. + + ion-3ds-20070203 ---------------- * There's been changes in padding/spacing usage in styles. Frames now surround stuff inside borders not with `spacing` pixels, but - with `padding_pixels. Spacing is only used to space things within + with `padding_pixels`. Spacing is only used to space things within the borders (all the tabs and the client window from each other). Consequently, custom styles may need to be updated to reflect this, by increasing the padding, possibly also altering/removing colour diff --git a/TODO.riot b/TODO.riot index 009833b..ffb8781 100644 --- a/TODO.riot +++ b/TODO.riot @@ -114,19 +114,6 @@ In-Reply-To: Tiled workspaces -From background-static Thu Mar 23 17:40:03 EET 2006 -Message-Id: -Date: Thu Mar 23 17:40:03 EET 2006 -Status: RO -X-Riot-Version: 1ds-yyyymmdd -From: Riot -X-Riot-Edited: Thu Mar 23 17:40:03 EET 2006 -Content-Type: text/plain; charset=utf-8 -Subject: A general solution to transients, queries and menus in tiny frames. -In-Reply-To: - -A general solution to transients, queries and menus in tiny frames. - From background-static Thu Mar 23 17:50:02 EET 2006 Message-Id: Date: Thu Mar 23 17:50:02 EET 2006 @@ -569,6 +556,19 @@ Subject: Done Done +From background-static Thu Mar 23 17:40:03 EET 2006 +Message-Id: +Date: Thu Mar 23 17:40:03 EET 2006 +Status: RO +X-Riot-Version: 1ds-yyyymmdd +From: Riot +X-Riot-Edited: Thu Mar 23 17:40:03 EET 2006 +Content-Type: text/plain; charset=utf-8 +Subject: A general solution to transients, queries and menus in tiny frames. +In-Reply-To: + +A general solution to transients, queries and menus in tiny frames. + From background-static Thu Mar 23 17:53:19 EET 2006 Message-Id: Date: Thu Mar 23 17:53:19 EET 2006 diff --git a/build/ac/configure.ac b/build/ac/configure.ac index 277cc96..88a8d4d 100644 --- a/build/ac/configure.ac +++ b/build/ac/configure.ac @@ -3,7 +3,7 @@ dnl Please report bugs in this autoconf script Tom Payne dnl $Header: /home/twp/cvsroot/twp/ion/ion-devel-autoconf/configure.ac,v 1.16 2004/01/14 11:32:19 twp Exp $ AC_INIT([Ion Window Manager], - [3ds-20070203], + [3ds-20070318], [nobody@nowhere.invalid], [ion3]) AC_PREREQ([2.58]) diff --git a/de/brush.c b/de/brush.c index fbaaa61..3101324 100644 --- a/de/brush.c +++ b/de/brush.c @@ -182,32 +182,42 @@ void debrush_get_border_widths(DEBrush *brush, GrBorderWidths *bdw) { DEStyle *style=brush->d; DEBorder *bd=&(style->border); - uint tmp=0, spc=style->spacing; + uint tmp=0; + uint tbf=1, lrf=1; + uint pad=bd->pad; + + switch(bd->sides){ + case DEBORDER_TB: + lrf=0; + break; + case DEBORDER_LR: + tbf=0; + break; + } switch(bd->style){ case DEBORDER_RIDGE: - tmp=spc; case DEBORDER_GROOVE: - tmp+=bd->sh+bd->hl+bd->pad; - bdw->top=tmp; bdw->bottom=tmp; bdw->left=tmp; bdw->right=tmp; + tmp=bd->sh+bd->hl; + bdw->top=tbf*tmp+pad; bdw->bottom=tbf*tmp+pad; + bdw->left=lrf*tmp+pad; bdw->right=lrf*tmp+pad; break; case DEBORDER_INLAID: - tmp=bd->sh+bd->pad+spc; bdw->top=tmp; bdw->left=tmp; - tmp=bd->hl+bd->pad+spc; bdw->bottom=tmp; bdw->right=tmp; + tmp=bd->sh; bdw->top=tbf*tmp+pad; bdw->left=lrf*tmp+pad; + tmp=bd->hl; bdw->bottom=tbf*tmp+pad; bdw->right=lrf*tmp+pad; break; case DEBORDER_ELEVATED: default: - tmp=bd->hl+bd->pad; bdw->top=tmp; bdw->left=tmp; - tmp=bd->sh+bd->pad; bdw->bottom=tmp; bdw->right=tmp; + tmp=bd->hl; bdw->top=tbf*tmp+pad; bdw->left=lrf*tmp+pad; + tmp=bd->sh; bdw->bottom=tbf*tmp+pad; bdw->right=lrf*tmp+pad; break; } + bdw->right+=brush->indicator_w; + bdw->tb_ileft=bdw->left; bdw->tb_iright=bdw->right; bdw->spacing=style->spacing; - - bdw->right+=brush->indicator_w; - bdw->tb_iright+=brush->indicator_w; } diff --git a/de/draw.c b/de/draw.c index 552e48f..40a2f8f 100644 --- a/de/draw.c +++ b/de/draw.c @@ -112,8 +112,8 @@ static void do_draw_border(Window win, GC gc, int x, int y, int w, int h, b=0; for(i=0; id->border); - GC gc=brush->d->normal_gc; - Window win=brush->win; - - switch(bd->style){ - case DEBORDER_RIDGE: - draw_border(win, gc, &geom, bd->hl, bd->sh, cg->hl, cg->sh); - case DEBORDER_INLAID: - draw_border(win, gc, &geom, bd->pad, bd->pad, cg->pad, cg->pad); - draw_border(win, gc, &geom, bd->sh, bd->hl, cg->sh, cg->hl); - break; - case DEBORDER_GROOVE: - draw_border(win, gc, &geom, bd->sh, bd->hl, cg->sh, cg->hl); - draw_border(win, gc, &geom, bd->pad, bd->pad, cg->pad, cg->pad); - draw_border(win, gc, &geom, bd->hl, bd->sh, cg->hl, cg->sh); - break; - case DEBORDER_ELEVATED: - default: - draw_border(win, gc, &geom, bd->hl, bd->sh, cg->hl, cg->sh); - draw_border(win, gc, &geom, bd->pad, bd->pad, cg->pad, cg->pad); - break; - } -} - - - - -void debrush_draw_border(DEBrush *brush, - const WRectangle *geom) -{ - DEColourGroup *cg=debrush_get_current_colour_group(brush); - if(cg!=NULL) - debrush_do_draw_border(brush, *geom, cg); -} - - static void draw_borderline(Window win, GC gc, WRectangle *geom, uint tl, uint br, DEColour tlc, DEColour brc, GrBorderLine line) { - if(line==GR_BORDERLINE_LEFT && geom->h>0){ + if(line==GR_BORDERLINE_LEFT && geom->h>0 && tl>0){ XSetForeground(ioncore_g.dpy, gc, tlc); - XDrawRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, tl, geom->h); + XSetBackground(ioncore_g.dpy, gc, tlc); + XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, tl, geom->h); geom->x+=tl; - }else if(line==GR_BORDERLINE_TOP && geom->w>0){ + }else if(line==GR_BORDERLINE_TOP && geom->w>0 && tl>0){ XSetForeground(ioncore_g.dpy, gc, tlc); - XDrawRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, geom->w, tl); + XSetBackground(ioncore_g.dpy, gc, tlc); + XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, geom->w, tl); geom->y+=tl; - }else if(line==GR_BORDERLINE_RIGHT && geom->h>0){ + }else if(line==GR_BORDERLINE_RIGHT && geom->h>0 && br>0){ XSetForeground(ioncore_g.dpy, gc, brc); - XDrawRectangle(ioncore_g.dpy, win, gc, geom->x+geom->w-1-br, geom->y, br, geom->h); + XSetBackground(ioncore_g.dpy, gc, brc); + XFillRectangle(ioncore_g.dpy, win, gc, geom->x+geom->w-br, geom->y, br, geom->h); geom->w-=br; - }else if(line==GR_BORDERLINE_BOTTOM && geom->w>0){ + }else if(line==GR_BORDERLINE_BOTTOM && geom->w>0 && br>0){ XSetForeground(ioncore_g.dpy, gc, brc); - XDrawRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y+geom->h-1-br, geom->w, br); + XSetBackground(ioncore_g.dpy, gc, brc); + XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y+geom->h-br, geom->w, br); geom->h-=br; } } @@ -229,6 +194,17 @@ void debrush_do_draw_borderline(DEBrush *brush, WRectangle geom, } +void debrush_do_draw_padline(DEBrush *brush, WRectangle geom, + DEColourGroup *cg, GrBorderLine line) +{ + DEBorder *bd=&(brush->d->border); + GC gc=brush->d->normal_gc; + Window win=brush->win; + + draw_borderline(win, gc, &geom, bd->pad, bd->pad, cg->pad, cg->pad, line); +} + + void debrush_draw_borderline(DEBrush *brush, const WRectangle *geom, GrBorderLine line) { @@ -238,6 +214,68 @@ void debrush_draw_borderline(DEBrush *brush, const WRectangle *geom, } +static void debrush_do_do_draw_border(DEBrush *brush, WRectangle geom, + DEColourGroup *cg) +{ + DEBorder *bd=&(brush->d->border); + GC gc=brush->d->normal_gc; + Window win=brush->win; + + switch(bd->style){ + case DEBORDER_RIDGE: + draw_border(win, gc, &geom, bd->hl, bd->sh, cg->hl, cg->sh); + case DEBORDER_INLAID: + draw_border(win, gc, &geom, bd->pad, bd->pad, cg->pad, cg->pad); + draw_border(win, gc, &geom, bd->sh, bd->hl, cg->sh, cg->hl); + break; + case DEBORDER_GROOVE: + draw_border(win, gc, &geom, bd->sh, bd->hl, cg->sh, cg->hl); + draw_border(win, gc, &geom, bd->pad, bd->pad, cg->pad, cg->pad); + draw_border(win, gc, &geom, bd->hl, bd->sh, cg->hl, cg->sh); + break; + case DEBORDER_ELEVATED: + default: + draw_border(win, gc, &geom, bd->hl, bd->sh, cg->hl, cg->sh); + draw_border(win, gc, &geom, bd->pad, bd->pad, cg->pad, cg->pad); + break; + } +} + + +void debrush_do_draw_border(DEBrush *brush, WRectangle geom, + DEColourGroup *cg) +{ + DEBorder *bd=&(brush->d->border); + + switch(bd->sides){ + case DEBORDER_ALL: + debrush_do_do_draw_border(brush, geom, cg); + break; + case DEBORDER_TB: + debrush_do_draw_padline(brush, geom, cg, GR_BORDERLINE_LEFT); + debrush_do_draw_padline(brush, geom, cg, GR_BORDERLINE_RIGHT); + debrush_do_draw_borderline(brush, geom, cg, GR_BORDERLINE_TOP); + debrush_do_draw_borderline(brush, geom, cg, GR_BORDERLINE_BOTTOM); + break; + case DEBORDER_LR: + debrush_do_draw_padline(brush, geom, cg, GR_BORDERLINE_TOP); + debrush_do_draw_padline(brush, geom, cg, GR_BORDERLINE_BOTTOM); + debrush_do_draw_borderline(brush, geom, cg, GR_BORDERLINE_LEFT); + debrush_do_draw_borderline(brush, geom, cg, GR_BORDERLINE_RIGHT); + break; + } +} + + +void debrush_draw_border(DEBrush *brush, + const WRectangle *geom) +{ + DEColourGroup *cg=debrush_get_current_colour_group(brush); + if(cg!=NULL) + debrush_do_draw_border(brush, *geom, cg); +} + + /*}}}*/ diff --git a/de/init.c b/de/init.c index ad40323..bc771d0 100644 --- a/de/init.c +++ b/de/init.c @@ -94,12 +94,33 @@ void de_get_border_style(uint *ret, ExtlTab tab) } +void de_get_border_sides(uint *ret, ExtlTab tab) +{ + char *style=NULL; + + if(!extl_table_gets_s(tab, "border_sides", &style)) + return; + + if(strcmp(style, "all")==0) + *ret=DEBORDER_ALL; + else if(strcmp(style, "tb")==0) + *ret=DEBORDER_TB; + else if(strcmp(style, "lr")==0) + *ret=DEBORDER_LR; + else + warn(TR("Unknown border side configuration \"%s\"."), style); + + free(style); +} + + void de_get_border(DEBorder *border, ExtlTab tab) { de_get_border_val(&(border->sh), tab, "shadow_pixels"); de_get_border_val(&(border->hl), tab, "highlight_pixels"); de_get_border_val(&(border->pad), tab, "padding_pixels"); de_get_border_style(&(border->style), tab); + de_get_border_sides(&(border->sides), tab); } diff --git a/de/style.c b/de/style.c index 8db97cd..b449337 100644 --- a/de/style.c +++ b/de/style.c @@ -220,6 +220,7 @@ bool destyle_init(DEStyle *style, WRootWin *rootwin, const char *name) style->border.hl=1; style->border.pad=1; style->border.style=DEBORDER_INLAID; + style->border.sides=DEBORDER_ALL; style->spacing=0; diff --git a/de/style.h b/de/style.h index 90dfc07..172b509 100644 --- a/de/style.h +++ b/de/style.h @@ -31,6 +31,12 @@ enum{ DEBORDER_GROOVE /* \_/xxxx\_/ */ }; +enum{ + DEBORDER_ALL=0, + DEBORDER_TB, + DEBORDER_LR +}; + enum{ DEALIGN_LEFT=0, @@ -42,6 +48,7 @@ enum{ DECLSTRUCT(DEBorder){ uint sh, hl, pad; uint style; + uint sides; }; diff --git a/doc/ChangeLog b/doc/ChangeLog index 0756556..00fe495 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,30 @@ +2007-03-18 20:09 UTC Tuomo Valkonen + tagged ion-doc-3ds-20070318 + +2007-03-17 19:08 UTC Tuomo Valkonen + * cfg_ion.lua walkthrough updates + +2007-03-17 11:13 UTC Tuomo Valkonen + * border_sides doc + +2007-02-25 19:48 UTC Tuomo Valkonen + * Note on "userpos" winprop. + +2007-02-20 02:47 UTC Tuomo Valkonen + * Winprop doc updates + +2007-02-20 02:27 UTC Tuomo Valkonen + * Removed outdated winprop + +2007-02-19 16:09 UTC Tuomo Valkonen + * Updated manager-managed figure + +2007-02-03 17:32 UTC Tuomo Valkonen + * Oops, still missing some statusbar stuff + +2007-02-03 17:30 UTC Tuomo Valkonen + * Minor fixes + 2007-02-03 15:04 UTC Tuomo Valkonen tagged ion-doc-3ds-20070203 diff --git a/doc/conf-winprops.tex b/doc/conf-winprops.tex index 9a416d3..e564b47 100644 --- a/doc/conf-winprops.tex +++ b/doc/conf-winprops.tex @@ -41,13 +41,6 @@ usual method of identifying windows, and how to obtain this information. \end{winprop} -\begin{winprop}{aspect}{table} - \index{aspect@\var{aspect}} - The table should contain the entries \var{w} and \var{h} that - override application-supplied aspect ratio hint. -\end{winprop} - - \begin{winprop}{float}{boolean} \index{float@\var{float}} Set this to open the window in a floating frame, when @@ -74,12 +67,6 @@ usual method of identifying windows, and how to obtain this information. \end{winprop} -\begin{winprop}{ignore_resizeinc}{boolean} - \index{ignore-resizeinc@\var{ignore_resizeinc}} - Should application supplied size increments be ignored? -\end{winprop} - - \begin{winprop}{jumpto}{boolean} \index{jumpto@\var{jumpto}} Should a newly created client window always be made @@ -87,19 +74,6 @@ usual method of identifying windows, and how to obtain this information. \end{winprop} -\begin{winprop}{max_size}{table} - \index{max-size@\var{max_size}} - The table should contain the entries \var{w} and \var{h} that - override application-supplied maximum size hint. -\end{winprop} - - -\begin{winprop}{min_size}{table} - \index{min-size@\var{min_size}} - Similar to \var{max_size} but for the minimum size hint. -\end{winprop} - - \begin{winprop}{new_group}{string} \index{new-group@\var{new_group}} If the region specified by \code{target} winprop does not exist @@ -119,10 +93,10 @@ usual method of identifying windows, and how to obtain this information. \begin{winprop}{statusbar}{string} \index{statusbar@\var{statusbar}} - Put the window on the statusbar, in the named tray component, - (The default tray component is called simply ``\code{systray}'', + Put the window in the statusbar, in the named tray component, + (The default tray component is called simply \code{"systray"}, and others you give names to in your custom template, always - prefixed by ``\code{systray_}''. + prefixed by \code{"systray_"}. \end{winprop} @@ -142,29 +116,45 @@ usual method of identifying windows, and how to obtain this information. \begin{winprop}{transient_mode}{string} \index{transient-mode@\var{transient_mode}} - "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 - transient by the application. "off": The window should be - handled as a normal window even if it is marked as a + \code{"normal"}: No change in behaviour. \code{"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 + transient by the application. \code{"off"}: The window should + be handled as a normal window even if it is marked as a transient by the application. \end{winprop} -\begin{winprop}{transients_at_top}{boolean} - \index{transients-at-top@\var{transients_at_top}} - When transients are managed by the client window itself (as it - is the case on tiled workspaces), should the transients be - placed at the top of the window instead of bottom? -\end{winprop} - - \begin{winprop}{transparent}{boolean} \index{transparent@\var{transparent}} Should frames be made transparent when this window is selected? \\ \end{winprop} +\subsection{Sizehint winprops} + +Additionally, the winprops +\code{max_size}\index{max-size@\var{max_size}}, +\code{min_size}\index{min-size@\var{min_size}}, +\code{aspect}\index{aspect@\var{aspect}}, +\code{resizeinc}\index{aspect@\var{resizeinc}}, +and +\code{ignore_max_size}\index{ignore-max-size@\var{ignore_max_size}}, +\code{ignore_min_size}\index{ignore-min-size@\var{ignore_min_size}}, +\code{ignore_aspect}\index{ignore-aspect@\var{ignore_aspect}}, +\code{ignore_resizeinc}\index{ignore-aspect@\var{ignore_resizeinc}}, +may be used to override application-supplied size hints. The four +first ones are tables with the fields \var{w} and \var{h}, indicating +the width and height size hints in pixels, and the latter ignore +winprop is a boolean. + +Finally, the boolean +\code{userpos}\index{userpos@\var{userpos}} option may be used to +override the \code{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 +only for floating windows. + \subsection{Classes, roles and instances} \label{sec:classesrolesinstances} diff --git a/doc/conf.tex b/doc/conf.tex index 109093b..eb0f565 100644 --- a/doc/conf.tex +++ b/doc/conf.tex @@ -69,6 +69,9 @@ files: Settings to get some applications behave more nicely have been collected here. See section \ref{sec:winprops}. \\ % + \file{cfg\_layouts.lua} & + Some workspace layouts are defined here. \\ + % \file{cfg\_tiling.lua} \file{cfg\_query.lua} \file{cfg\_menu.lua} @@ -125,13 +128,23 @@ The first of these two settings enables opaque resize mode: in move/resize move frames and other objects mirror you actions immediately. If opaque resize is disabled, a XOR rubber band is shown during the mode instead. This will, unfortunately, cause Ion to also grab the X server and has some -side effects. +side effects. + +There are some other options as well; see the documentation +for \fnref{ioncore.set} for details. -Next we load the configuration for Ion's core, and some kludges: +As a next step, in the actual \file{cfg\_ion.lua} file, we load +\file{cfg\_defaults.lua}. However, it is merely a conveniency file for +doing exactly what we will going through below, and what is commented +out in the actual file. If you do not want to load what +\file{cfg\_defaults.lua} loads, just comment out the corresponding +line, and uncomment the lines for the files that you want: \begin{verbatim} +--dopath("cfg_defaults") dopath("cfg_ioncore") dopath("cfg_kludges") +dopath("cfg_layouts") \end{verbatim} Most bindings and menus are defined in \file{cfg\_ioncore.lua}. @@ -150,26 +163,21 @@ expression that is used to match against the title and the next is a rule to construct a new title of a match occurs. This particular rule is used to shorten e.g. 'Foo: barbaz<3>' to 'barba{\ldots}<3>'; for details see the function reference entry for \fnref{ioncore.defshortening}. +Finally, \file{cfg\_layouts.lua} defines some workspace layouts, available +through the \key{F9} workspace creation query. To actually be able to do something besides display windows in full screen mode, we must next load some modules: \begin{verbatim} -dopath("cfg_modules") ---dopath("mod_query") ---dopath("mod_menu") ---dopath("mod_tiling") ---dopath("mod_statusbar") +dopath("mod_query") +dopath("mod_menu") +dopath("mod_tiling") +dopath("mod_statusbar") --dopath("mod_dock") ---dopath("mod_sp") +dopath("mod_sp") \end{verbatim} -We actually load there another file listing the default selection of -modules. If you only want to load additional modules, just uncomment -the corresponding line. If you want to disable loading some modules, -comment out the the line loading \file{cfg\_modules}, and uncomment -the lines for the modules you want, or add more. - \input{conf-bindings.tex} diff --git a/doc/de.tex b/doc/de.tex index ceba206..4697dc6 100644 --- a/doc/de.tex +++ b/doc/de.tex @@ -254,6 +254,10 @@ indicating a number of pixels. \var{border_style} & A string indicating the style of border; one of elevated/inlaid/ridge/groove as seen in the above sketch. \\ +\var{border_sides} & A string indicating which sides of the border + to draw: all/tb/lr for all, top and bottom, and + left and right. To control between left/right + and top/bottom, use the pixel options below. \\ \var{highlight_pixels} & Width of the highlight part of the border in pixels. \\ \var{shadow_pixels} & diff --git a/doc/exact-version b/doc/exact-version index 40b3215..483b164 100644 --- a/doc/exact-version +++ b/doc/exact-version @@ -1,5 +1,5 @@ Context: -[TAG ion-doc-3ds-20070203 -Tuomo Valkonen **20070203150437] +[TAG ion-doc-3ds-20070318 +Tuomo Valkonen **20070318200902] diff --git a/doc/fnref.tex b/doc/fnref.tex index c270a5a..c0590b6 100644 --- a/doc/fnref.tex +++ b/doc/fnref.tex @@ -29,6 +29,10 @@ \label{sec:spref} \input{mod_sp-fns.tex} +\section{Functions defined in \file{mod\_statusbar}} +\label{sec:statusbarref} +\input{mod_statusbar-fns.tex} + \section{Functions defined in \file{de}} \label{sec:deref} \input{de-fns.tex} diff --git a/doc/ionconf.dvi.gz b/doc/ionconf.dvi.gz index 7d7c934..acdd808 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 2f1b8ec..7882440 100644 --- a/doc/ionconf.out +++ b/doc/ionconf.out @@ -22,9 +22,10 @@ \BOOKMARK [2][-]{subsection.3.4.3}{ Defining context menus}{section.3.4} \BOOKMARK [2][-]{subsection.3.4.4}{ Displaying menus}{section.3.4} \BOOKMARK [1][-]{section.3.5}{ Winprops}{chapter.3} -\BOOKMARK [2][-]{subsection.3.5.1}{ Classes, roles and instances}{section.3.5} -\BOOKMARK [2][-]{subsection.3.5.2}{ Finding window identification}{section.3.5} -\BOOKMARK [2][-]{subsection.3.5.3}{ Some common examples}{section.3.5} +\BOOKMARK [2][-]{subsection.3.5.1}{ Sizehint winprops}{section.3.5} +\BOOKMARK [2][-]{subsection.3.5.2}{ Classes, roles and instances}{section.3.5} +\BOOKMARK [2][-]{subsection.3.5.3}{ Finding window identification}{section.3.5} +\BOOKMARK [2][-]{subsection.3.5.4}{ Some common examples}{section.3.5} \BOOKMARK [0][-]{chapter.4}{ Graphical styles}{} \BOOKMARK [1][-]{section.4.1}{ Drawing engines, style specifications and sub-styles}{chapter.4} \BOOKMARK [2][-]{subsection.4.1.1}{ Known styles and substyles}{section.4.1} @@ -33,15 +34,15 @@ \BOOKMARK [2][-]{subsection.4.2.2}{ Defining the styles}{section.4.2} \BOOKMARK [2][-]{subsection.4.2.3}{ An example}{section.4.2} \BOOKMARK [1][-]{section.4.3}{ Miscellaneous settings}{chapter.4} -\BOOKMARK [2][-]{lstlisting.4.-390}{ Extra fields for style !frame!}{section.4.3} -\BOOKMARK [2][-]{lstlisting.4.-412}{ Extra fields for style !dock!}{section.4.3} +\BOOKMARK [2][-]{lstlisting.4.-399}{ Extra fields for style !frame!}{section.4.3} +\BOOKMARK [2][-]{lstlisting.4.-421}{ Extra fields for style !dock!}{section.4.3} \BOOKMARK [0][-]{chapter.5}{ Scripting}{} \BOOKMARK [1][-]{section.5.1}{ Hooks}{chapter.5} \BOOKMARK [1][-]{section.5.2}{ Referring to regions}{chapter.5} \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.-453}{ Writing !ion-statusd! monitors}{chapter.5} +\BOOKMARK [1][-]{lstlisting.5.-462}{ 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} @@ -75,8 +76,10 @@ \BOOKMARK [1][-]{section.6.5}{ Functions defined in mod\137dock}{chapter.6} \BOOKMARK [2][-]{subsection.6.5.1}{ WDock functions}{section.6.5} \BOOKMARK [1][-]{section.6.6}{ Functions defined in mod\137sp}{chapter.6} -\BOOKMARK [1][-]{section.6.7}{ Functions defined in de}{chapter.6} -\BOOKMARK [1][-]{section.6.8}{ Hooks}{chapter.6} +\BOOKMARK [1][-]{section.6.7}{ Functions defined in mod\137statusbar}{chapter.6} +\BOOKMARK [2][-]{subsection.6.7.1}{ WStatusBar functions}{section.6.7} +\BOOKMARK [1][-]{section.6.8}{ Functions defined in de}{chapter.6} +\BOOKMARK [1][-]{section.6.9}{ Hooks}{chapter.6} \BOOKMARK [0][-]{appendix.A}{ The GNU General Public License}{} \BOOKMARK [0][-]{appendix.B}{ Full class hierarchy visible to Lua-side}{} \BOOKMARK [0][-]{section*.17}{Index}{} diff --git a/doc/ionconf.ps.gz b/doc/ionconf.ps.gz index 6103c98..3f368d7 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 3f22904..b12cb17 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-02-03} +\date{2007-03-18} \makeindex diff --git a/doc/ionconf/images.log b/doc/ionconf/images.log index 3fec32a..2475ca5 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 2006.11.18) 3 FEB 2007 17:05 +This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=latex 2007.2.4) 18 MAR 2007 22:35 entering extended mode **./images.tex (./images.tex @@ -353,13 +353,13 @@ LaTeX Font Info: External font `cmex10' loaded for size (Font) <8> on input line 235. LaTeX Font Info: External font `cmex10' loaded for size (Font) <6> on input line 235. -l2hSize :tex2html_wrap_inline1027:7.0626pt::0.0pt::7.1201pt. +l2hSize :tex2html_wrap_inline1041:7.0626pt::0.0pt::7.1201pt. [1 ] -l2hSize :tex2html_wrap_inline1031:7.48248pt::0.0pt::48.86426pt. +l2hSize :tex2html_wrap_inline1045:7.48248pt::0.0pt::48.86426pt. [2 @@ -369,26 +369,26 @@ l2hSize :tex2html_wrap_inline2020:8.7125pt::8.7125pt::23.6642pt. ] -l2hSize :tex2html_wrap_inline6229:7.5626pt::7.5626pt::14.53923pt. +l2hSize :tex2html_wrap_inline6387:7.5626pt::7.5626pt::14.53923pt. [4 ] -l2hSize :tex2html_wrap_inline6231:7.5626pt::7.5626pt::14.53923pt. +l2hSize :tex2html_wrap_inline6389:7.5626pt::7.5626pt::14.53923pt. [5 ] -l2hSize :tex2html_wrap_inline9215:8.7125pt::8.7125pt::86.9574pt. +l2hSize :tex2html_wrap_inline9409:8.7125pt::8.7125pt::86.9574pt. [6 ] (./images.aux) ) Here is how much of TeX's memory you used: - 4428 strings out of 94501 - 62589 string characters out of 1175793 - 121255 words of memory out of 1000000 - 7572 multiletter control sequences out of 10000+50000 + 4443 strings out of 94501 + 62984 string characters out of 1175795 + 122206 words of memory out of 1000000 + 7587 multiletter control sequences out of 10000+50000 7874 words of font info for 24 fonts, out of 500000 for 2000 580 hyphenation exceptions out of 8191 28i,5n,21p,200b,182s stack positions out of 1500i,500n,5000p,200000b,5000s diff --git a/doc/ionconf/images.tex b/doc/ionconf/images.tex index fa6a169..8ab5731 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-02-03} +\date{2007-03-18} \makeindex @@ -231,7 +231,7 @@ \stepcounter{section} \stepcounter{section} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline1027}% +\lthtmlinlinemathA{tex2html_wrap_inline1041}% $n$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} @@ -242,7 +242,7 @@ $n$% \stepcounter{subsection} \stepcounter{subsection} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline1031}% +\lthtmlinlinemathA{tex2html_wrap_inline1045}% $N=1{\ldots} 5$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} @@ -272,6 +272,7 @@ $N=1{\ldots} 5$% \stepcounter{subsection} \stepcounter{subsection} \stepcounter{subsection} +\stepcounter{subsection} \stepcounter{subsubsection} \stepcounter{subsubsection} \stepcounter{subsubsection} @@ -316,13 +317,13 @@ $(0, 1]$% \stepcounter{subsection} \stepcounter{subsection} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline6229}% +\lthtmlinlinemathA{tex2html_wrap_inline6387}% $-1$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline6231}% +\lthtmlinlinemathA{tex2html_wrap_inline6389}% $-2$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} @@ -351,13 +352,15 @@ $-2$% \stepcounter{section} \stepcounter{subsection} {\newpage\clearpage -\lthtmlinlinemathA{tex2html_wrap_inline9215}% +\lthtmlinlinemathA{tex2html_wrap_inline9409}% $\{t,m,b\}\times\{t,c,b\}$% \lthtmlinlinemathZ \lthtmlcheckvsize\clearpage} \stepcounter{section} \stepcounter{section} +\stepcounter{subsection} +\stepcounter{section} \stepcounter{section} \appendix \stepcounter{chapter} diff --git a/doc/ionconf/index.html b/doc/ionconf/index.html index b693be4..a2f4405 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-02-03

+

2007-03-18

@@ -151,187 +151,195 @@ chapter entitled ''GNU General Public License'' for more details. HREF="node4.html#SECTION00450000000000000000">3.5 Winprops


-
  • 4. Graphical styles
    -
  • 5. Scripting
    -
  • 6. Function reference
    -
  • A. The GNU General Public License
    -
  • B. Full class hierarchy visible to Lua-side -
  • List of functions -
  • Index -
  • About this document ... diff --git a/doc/ionconf/internals.pl b/doc/ionconf/internals.pl index 28350c3..0c3453a 100644 --- a/doc/ionconf/internals.pl +++ b/doc/ionconf/internals.pl @@ -122,6 +122,10 @@ $key = q/sec:ioncoreref/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:mod_statusbar.statusbars/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.defbindings/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -130,11 +134,11 @@ $key = q/fn:ioncore.get/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WComplProxy.set_completions/; +$key = q/fn:WWindow.p_resize/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WWindow.p_resize/; +$key = q/fn:WComplProxy.set_completions/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -194,6 +198,10 @@ $key = q/fn:WMoveresMode.resize/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.is_systray_extl/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WMenu.select_nth/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -322,6 +330,10 @@ $key = q/fn:WWindow.xid/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/sec:statusbarref/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WClientWin.get_ident/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -370,6 +382,10 @@ $key = q/fn:ioncore.clientwin_i/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.tagged_clear/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WRegion.screen_of/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -378,6 +394,10 @@ $key = q/fn:WMPlex.switch_next/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.unsqueeze/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WGroup.bottom/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -442,6 +462,10 @@ $key = q/chap:tricks/; $ref_files{$key} = "$dir".q|node6.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WRegion.groupleader_of/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.get_savefile/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -478,6 +502,14 @@ $key = q/fn:ioncore.getctxmenu/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WMoveresMode.rqgeom/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/fn:WStatusBar.get_template_table/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WFrame.maximize_horiz/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -486,11 +518,11 @@ $key = q/fn:ioncore.region_i/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WWindow.p_move/; +$key = q/fn:WGroup.is_fullscreen/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WGroup.is_fullscreen/; +$key = q/fn:WWindow.p_move/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -502,11 +534,11 @@ $key = q/fn:WScreen.set_managed_offset/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:mod_query.set/; +$key = q/fn:ioncore.get_dir_for/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:ioncore.get_dir_for/; +$key = q/fn:mod_query.set/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -662,6 +694,10 @@ $key = q/fn:mod_query.message/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:mod_tiling.untile/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.compile_cmd/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -678,10 +714,6 @@ $key = q/fn:ioncore.submenu/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WMPlex.attach_tagged/; -$ref_files{$key} = "$dir".q|node7.html|; -$noresave{$key} = "$nosave"; - $key = q/fn:WSplitSplit.br/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -762,6 +794,10 @@ $key = q/sec:classesrolesinstances/; $ref_files{$key} = "$dir".q|node4.html|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.tagged_attach/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WRegion.is_tagged/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -782,6 +818,10 @@ $key = q/fn:WClientWin.nudge/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WMoveresMode.geom/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.goto_nth_screen/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -826,6 +866,10 @@ $key = q/fn:ioncore.mclick/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.update/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WMPlex.set_index/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -934,6 +978,10 @@ $key = q/fn:ioncore.popen_bgread/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_systray/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.mdrag/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -950,10 +998,6 @@ $key = q/ioncore_snapshot_hook/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:ioncore.clear_tags/; -$ref_files{$key} = "$dir".q|node7.html|; -$noresave{$key} = "$nosave"; - $key = q/fn:table.map/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -986,11 +1030,11 @@ $key = q/fn:WRegion.parent/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WMenu.finish/; +$key = q/fn:WEdln.back/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WEdln.back/; +$key = q/fn:WMenu.finish/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -1018,7 +1062,7 @@ $key = q/fn:WTiling.transpose_at/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/clientwin_do_manage_alt/; +$key = q/fn:WRegion.rootwin_of/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -1026,7 +1070,7 @@ $key = q/fn:WMPlex.mx_i/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WRegion.rootwin_of/; +$key = q/clientwin_do_manage_alt/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -1038,6 +1082,10 @@ $key = q/ioncore_sigchld_hook/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_template_table/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WTiling.nextto/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -1138,6 +1186,10 @@ $key = q/fig:parentship/; $ref_files{$key} = "$dir".q|node3.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_template/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.read_savefile/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -1206,6 +1258,10 @@ $key = q/fn:WMPlex.is_hidden/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WRegion.get_configuration/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:mod_menu.get/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -1222,6 +1278,10 @@ $key = q/fn:WEdln.eol/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WGroup.set_bottom/; +$ref_files{$key} = "$dir".q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:mod_query.defcmd/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; @@ -1286,11 +1346,11 @@ $key = q/fn:WEdln.skip_word/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WEdln.complete/; +$key = q/fn:WGroup.attach_new/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WGroup.attach_new/; +$key = q/fn:WEdln.complete/; $ref_files{$key} = "$dir".q|node7.html|; $noresave{$key} = "$nosave"; diff --git a/doc/ionconf/ionconf.html b/doc/ionconf/ionconf.html index b693be4..a2f4405 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-02-03

    +

    2007-03-18

    @@ -151,187 +151,195 @@ chapter entitled ''GNU General Public License'' for more details. HREF="node4.html#SECTION00450000000000000000">3.5 Winprops


    -
  • 4. Graphical styles
    -
  • 5. Scripting
    -
  • 6. Function reference
    -
  • A. The GNU General Public License
    -
  • B. Full class hierarchy visible to Lua-side -
  • List of functions -
  • Index -
  • About this document ... diff --git a/doc/ionconf/labels.pl b/doc/ionconf/labels.pl index 2d6ca3c..a14d1d0 100644 --- a/doc/ionconf/labels.pl +++ b/doc/ionconf/labels.pl @@ -122,6 +122,10 @@ $key = q/sec:ioncoreref/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:mod_statusbar.statusbars/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.defbindings/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -130,11 +134,11 @@ $key = q/fn:ioncore.get/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WComplProxy.set_completions/; +$key = q/fn:WWindow.p_resize/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WWindow.p_resize/; +$key = q/fn:WComplProxy.set_completions/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -194,6 +198,10 @@ $key = q/fn:WMoveresMode.resize/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.is_systray_extl/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WMenu.select_nth/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -322,6 +330,10 @@ $key = q/fn:WWindow.xid/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/sec:statusbarref/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WClientWin.get_ident/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -370,6 +382,10 @@ $key = q/fn:ioncore.clientwin_i/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.tagged_clear/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WRegion.screen_of/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -378,6 +394,10 @@ $key = q/fn:WMPlex.switch_next/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.unsqueeze/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WGroup.bottom/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -442,6 +462,10 @@ $key = q/chap:tricks/; $external_labels{$key} = "$URL/" . q|node6.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WRegion.groupleader_of/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.get_savefile/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -478,6 +502,14 @@ $key = q/fn:ioncore.getctxmenu/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WMoveresMode.rqgeom/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + +$key = q/fn:WStatusBar.get_template_table/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WFrame.maximize_horiz/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -486,11 +518,11 @@ $key = q/fn:ioncore.region_i/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WWindow.p_move/; +$key = q/fn:WGroup.is_fullscreen/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WGroup.is_fullscreen/; +$key = q/fn:WWindow.p_move/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -502,11 +534,11 @@ $key = q/fn:WScreen.set_managed_offset/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:mod_query.set/; +$key = q/fn:ioncore.get_dir_for/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:ioncore.get_dir_for/; +$key = q/fn:mod_query.set/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -662,6 +694,10 @@ $key = q/fn:mod_query.message/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:mod_tiling.untile/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.compile_cmd/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -678,10 +714,6 @@ $key = q/fn:ioncore.submenu/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WMPlex.attach_tagged/; -$external_labels{$key} = "$URL/" . q|node7.html|; -$noresave{$key} = "$nosave"; - $key = q/fn:WSplitSplit.br/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -762,6 +794,10 @@ $key = q/sec:classesrolesinstances/; $external_labels{$key} = "$URL/" . q|node4.html|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.tagged_attach/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WRegion.is_tagged/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -782,6 +818,10 @@ $key = q/fn:WClientWin.nudge/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WMoveresMode.geom/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.goto_nth_screen/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -826,6 +866,10 @@ $key = q/fn:ioncore.mclick/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.update/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WMPlex.set_index/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -934,6 +978,10 @@ $key = q/fn:ioncore.popen_bgread/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_systray/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.mdrag/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -950,10 +998,6 @@ $key = q/ioncore_snapshot_hook/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:ioncore.clear_tags/; -$external_labels{$key} = "$URL/" . q|node7.html|; -$noresave{$key} = "$nosave"; - $key = q/fn:table.map/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -986,11 +1030,11 @@ $key = q/fn:WRegion.parent/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WMenu.finish/; +$key = q/fn:WEdln.back/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WEdln.back/; +$key = q/fn:WMenu.finish/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1018,7 +1062,7 @@ $key = q/fn:WTiling.transpose_at/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/clientwin_do_manage_alt/; +$key = q/fn:WRegion.rootwin_of/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1026,7 +1070,7 @@ $key = q/fn:WMPlex.mx_i/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WRegion.rootwin_of/; +$key = q/clientwin_do_manage_alt/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1038,6 +1082,10 @@ $key = q/ioncore_sigchld_hook/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_template_table/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:WTiling.nextto/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1138,6 +1186,10 @@ $key = q/fig:parentship/; $external_labels{$key} = "$URL/" . q|node3.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_template/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.read_savefile/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1206,6 +1258,10 @@ $key = q/fn:WMPlex.is_hidden/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WRegion.get_configuration/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:mod_menu.get/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1222,6 +1278,10 @@ $key = q/fn:WEdln.eol/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; +$key = q/fn:WGroup.set_bottom/; +$external_labels{$key} = "$URL/" . q|node7.html|; +$noresave{$key} = "$nosave"; + $key = q/fn:mod_query.defcmd/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1286,11 +1346,11 @@ $key = q/fn:WEdln.skip_word/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WEdln.complete/; +$key = q/fn:WGroup.attach_new/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; -$key = q/fn:WGroup.attach_new/; +$key = q/fn:WEdln.complete/; $external_labels{$key} = "$URL/" . q|node7.html|; $noresave{$key} = "$nosave"; @@ -1398,7 +1458,7 @@ $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/sec:hookref/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/chap:config/; @@ -1429,6 +1489,10 @@ $key = q/sec:ioncoreref/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; +$key = q/fn:mod_statusbar.statusbars/; +$external_latex_labels{$key} = q|6.7|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.defbindings/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; @@ -1437,14 +1501,14 @@ $key = q/fn:ioncore.get/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; -$key = q/fn:WComplProxy.set_completions/; -$external_latex_labels{$key} = q|6.3.1|; -$noresave{$key} = "$nosave"; - $key = q/fn:WWindow.p_resize/; $external_latex_labels{$key} = q|6.1.12|; $noresave{$key} = "$nosave"; +$key = q/fn:WComplProxy.set_completions/; +$external_latex_labels{$key} = q|6.3.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.shutdown/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; @@ -1478,7 +1542,7 @@ $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/fn:de.reset/; -$external_latex_labels{$key} = q|6.7|; +$external_latex_labels{$key} = q|6.8|; $noresave{$key} = "$nosave"; $key = q/fn:mod_query.history_get/; @@ -1501,6 +1565,10 @@ $key = q/fn:WMoveresMode.resize/; $external_latex_labels{$key} = q|6.1.8|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.is_systray_extl/; +$external_latex_labels{$key} = q|6.7.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:WMenu.select_nth/; $external_latex_labels{$key} = q|6.4.1|; $noresave{$key} = "$nosave"; @@ -1598,7 +1666,7 @@ $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/region_do_warp_alt/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:ioncore.resign/; @@ -1606,7 +1674,7 @@ $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/clientwin_unmapped_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:ioncore.write_savefile/; @@ -1629,6 +1697,10 @@ $key = q/fn:WWindow.xid/; $external_latex_labels{$key} = q|6.1.12|; $noresave{$key} = "$nosave"; +$key = q/sec:statusbarref/; +$external_latex_labels{$key} = q|6.7|; +$noresave{$key} = "$nosave"; + $key = q/fn:WClientWin.get_ident/; $external_latex_labels{$key} = q|6.1.1|; $noresave{$key} = "$nosave"; @@ -1677,6 +1749,10 @@ $key = q/fn:ioncore.clientwin_i/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.tagged_clear/; +$external_latex_labels{$key} = q|6.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:WRegion.screen_of/; $external_latex_labels{$key} = q|6.1.9|; $noresave{$key} = "$nosave"; @@ -1685,6 +1761,10 @@ $key = q/fn:WMPlex.switch_next/; $external_latex_labels{$key} = q|6.1.7|; $noresave{$key} = "$nosave"; +$key = q/fn:ioncore.unsqueeze/; +$external_latex_labels{$key} = q|6.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:WGroup.bottom/; $external_latex_labels{$key} = q|6.1.3|; $noresave{$key} = "$nosave"; @@ -1742,13 +1822,17 @@ $external_latex_labels{$key} = q|B|; $noresave{$key} = "$nosave"; $key = q/frame_managed_changed_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/chap:tricks/; $external_latex_labels{$key} = q|5|; $noresave{$key} = "$nosave"; +$key = q/fn:WRegion.groupleader_of/; +$external_latex_labels{$key} = q|6.1.9|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.get_savefile/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; @@ -1785,6 +1869,14 @@ $key = q/fn:ioncore.getctxmenu/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; +$key = q/fn:WMoveresMode.rqgeom/; +$external_latex_labels{$key} = q|6.1.8|; +$noresave{$key} = "$nosave"; + +$key = q/fn:WStatusBar.get_template_table/; +$external_latex_labels{$key} = q|6.7.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:WFrame.maximize_horiz/; $external_latex_labels{$key} = q|6.1.2|; $noresave{$key} = "$nosave"; @@ -1793,14 +1885,14 @@ $key = q/fn:ioncore.region_i/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; -$key = q/fn:WWindow.p_move/; -$external_latex_labels{$key} = q|6.1.12|; -$noresave{$key} = "$nosave"; - $key = q/fn:WGroup.is_fullscreen/; $external_latex_labels{$key} = q|6.1.3|; $noresave{$key} = "$nosave"; +$key = q/fn:WWindow.p_move/; +$external_latex_labels{$key} = q|6.1.12|; +$noresave{$key} = "$nosave"; + $key = q/sec:objects/; $external_latex_labels{$key} = q|2.2|; $noresave{$key} = "$nosave"; @@ -1809,14 +1901,14 @@ $key = q/fn:WScreen.set_managed_offset/; $external_latex_labels{$key} = q|6.1.11|; $noresave{$key} = "$nosave"; -$key = q/fn:mod_query.set/; -$external_latex_labels{$key} = q|6.3|; -$noresave{$key} = "$nosave"; - $key = q/fn:ioncore.get_dir_for/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; +$key = q/fn:mod_query.set/; +$external_latex_labels{$key} = q|6.3|; +$noresave{$key} = "$nosave"; + $key = q/fn:WEdln.point/; $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; @@ -1878,7 +1970,7 @@ $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; $key = q/screen_managed_changed_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:WMPlex.mx_count/; @@ -1969,12 +2061,16 @@ $key = q/fn:mod_query.message/; $external_latex_labels{$key} = q|6.3|; $noresave{$key} = "$nosave"; +$key = q/fn:mod_tiling.untile/; +$external_latex_labels{$key} = q|6.2|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.compile_cmd/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/sec:deref/; -$external_latex_labels{$key} = q|6.7|; +$external_latex_labels{$key} = q|6.8|; $noresave{$key} = "$nosave"; $key = q/fn:WEdln.bol/; @@ -1985,10 +2081,6 @@ $key = q/fn:ioncore.submenu/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; -$key = q/fn:WMPlex.attach_tagged/; -$external_latex_labels{$key} = q|6.1.7|; -$noresave{$key} = "$nosave"; - $key = q/fn:WSplitSplit.br/; $external_latex_labels{$key} = q|6.2.4|; $noresave{$key} = "$nosave"; @@ -2010,7 +2102,7 @@ $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; $key = q/fn:de.defstyle/; -$external_latex_labels{$key} = q|6.7|; +$external_latex_labels{$key} = q|6.8|; $noresave{$key} = "$nosave"; $key = q/fn:WGroupWS.attach_framed/; @@ -2038,7 +2130,7 @@ $external_latex_labels{$key} = q|6.1.9|; $noresave{$key} = "$nosave"; $key = q/region_notify_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:WEdln.clear_mark/; @@ -2050,7 +2142,7 @@ $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/tiling_placement_alt/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:ioncore.warn/; @@ -2066,7 +2158,11 @@ $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/sec:classesrolesinstances/; -$external_latex_labels{$key} = q|3.5.1|; +$external_latex_labels{$key} = q|3.5.2|; +$noresave{$key} = "$nosave"; + +$key = q/fn:ioncore.tagged_attach/; +$external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/fn:WRegion.is_tagged/; @@ -2089,12 +2185,16 @@ $key = q/fn:WClientWin.nudge/; $external_latex_labels{$key} = q|6.1.1|; $noresave{$key} = "$nosave"; +$key = q/fn:WMoveresMode.geom/; +$external_latex_labels{$key} = q|6.1.8|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.goto_nth_screen/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/clientwin_mapped_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:WEdln.paste/; @@ -2122,7 +2222,7 @@ $external_latex_labels{$key} = q|6.3|; $noresave{$key} = "$nosave"; $key = q/clientwin_property_change_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:table.append/; @@ -2133,6 +2233,10 @@ $key = q/fn:ioncore.mclick/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.update/; +$external_latex_labels{$key} = q|6.7.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:WMPlex.set_index/; $external_latex_labels{$key} = q|6.1.7|; $noresave{$key} = "$nosave"; @@ -2158,7 +2262,7 @@ $external_latex_labels{$key} = q|6.3|; $noresave{$key} = "$nosave"; $key = q/ioncore_deinit_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:WSplit.geom/; @@ -2241,6 +2345,10 @@ $key = q/fn:ioncore.popen_bgread/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_systray/; +$external_latex_labels{$key} = q|6.7.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.mdrag/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; @@ -2254,11 +2362,7 @@ $external_latex_labels{$key} = q|6.2.1|; $noresave{$key} = "$nosave"; $key = q/ioncore_snapshot_hook/; -$external_latex_labels{$key} = q|6.8|; -$noresave{$key} = "$nosave"; - -$key = q/fn:ioncore.clear_tags/; -$external_latex_labels{$key} = q|6.1|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:table.map/; @@ -2293,14 +2397,14 @@ $key = q/fn:WRegion.parent/; $external_latex_labels{$key} = q|6.1.9|; $noresave{$key} = "$nosave"; -$key = q/fn:WMenu.finish/; -$external_latex_labels{$key} = q|6.4.1|; -$noresave{$key} = "$nosave"; - $key = q/fn:WEdln.back/; $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; +$key = q/fn:WMenu.finish/; +$external_latex_labels{$key} = q|6.4.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.TR/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; @@ -2325,16 +2429,16 @@ $key = q/fn:WTiling.transpose_at/; $external_latex_labels{$key} = q|6.2.5|; $noresave{$key} = "$nosave"; -$key = q/clientwin_do_manage_alt/; -$external_latex_labels{$key} = q|6.8|; +$key = q/fn:WRegion.rootwin_of/; +$external_latex_labels{$key} = q|6.1.9|; $noresave{$key} = "$nosave"; $key = q/fn:WMPlex.mx_i/; $external_latex_labels{$key} = q|6.1.7|; $noresave{$key} = "$nosave"; -$key = q/fn:WRegion.rootwin_of/; -$external_latex_labels{$key} = q|6.1.9|; +$key = q/clientwin_do_manage_alt/; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:ioncore.match_winprop_name/; @@ -2342,7 +2446,11 @@ $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; $key = q/ioncore_sigchld_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; +$noresave{$key} = "$nosave"; + +$key = q/fn:WStatusBar.set_template_table/; +$external_latex_labels{$key} = q|6.7.1|; $noresave{$key} = "$nosave"; $key = q/fn:WTiling.nextto/; @@ -2354,7 +2462,7 @@ $external_latex_labels{$key} = q|6.5.1|; $noresave{$key} = "$nosave"; $key = q/fn:de.substyle/; -$external_latex_labels{$key} = q|6.7|; +$external_latex_labels{$key} = q|6.8|; $noresave{$key} = "$nosave"; $key = q/fn:WEdln.copy/; @@ -2445,6 +2553,10 @@ $key = q/fig:parentship/; $external_latex_labels{$key} = q|2.2|; $noresave{$key} = "$nosave"; +$key = q/fn:WStatusBar.set_template/; +$external_latex_labels{$key} = q|6.7.1|; +$noresave{$key} = "$nosave"; + $key = q/fn:ioncore.read_savefile/; $external_latex_labels{$key} = q|6.1|; $noresave{$key} = "$nosave"; @@ -2513,6 +2625,10 @@ $key = q/fn:WMPlex.is_hidden/; $external_latex_labels{$key} = q|6.1.7|; $noresave{$key} = "$nosave"; +$key = q/fn:WRegion.get_configuration/; +$external_latex_labels{$key} = q|6.1.9|; +$noresave{$key} = "$nosave"; + $key = q/fn:mod_menu.get/; $external_latex_labels{$key} = q|6.4|; $noresave{$key} = "$nosave"; @@ -2529,6 +2645,10 @@ $key = q/fn:WEdln.eol/; $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; +$key = q/fn:WGroup.set_bottom/; +$external_latex_labels{$key} = q|6.1.3|; +$noresave{$key} = "$nosave"; + $key = q/fn:mod_query.defcmd/; $external_latex_labels{$key} = q|6.3|; $noresave{$key} = "$nosave"; @@ -2562,11 +2682,11 @@ $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; $key = q/fn:de.defstyle_rootwin/; -$external_latex_labels{$key} = q|6.7|; +$external_latex_labels{$key} = q|6.8|; $noresave{$key} = "$nosave"; $key = q/ioncore_post_layout_setup_hook/; -$external_latex_labels{$key} = q|6.8|; +$external_latex_labels{$key} = q|6.9|; $noresave{$key} = "$nosave"; $key = q/fn:table.icat/; @@ -2593,14 +2713,14 @@ $key = q/fn:WEdln.skip_word/; $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; -$key = q/fn:WEdln.complete/; -$external_latex_labels{$key} = q|6.3.2|; -$noresave{$key} = "$nosave"; - $key = q/fn:WGroup.attach_new/; $external_latex_labels{$key} = q|6.1.3|; $noresave{$key} = "$nosave"; +$key = q/fn:WEdln.complete/; +$external_latex_labels{$key} = q|6.3.2|; +$noresave{$key} = "$nosave"; + $key = q/fn:WEdln.transpose_chars/; $external_latex_labels{$key} = q|6.3.2|; $noresave{$key} = "$nosave"; diff --git a/doc/ionconf/node1.html b/doc/ionconf/node1.html index ee25b4d..b243cb3 100644 --- a/doc/ionconf/node1.html +++ b/doc/ionconf/node1.html @@ -28,26 +28,26 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -60,210 +60,218 @@ Contents diff --git a/doc/ionconf/node10.html b/doc/ionconf/node10.html index 46a988d..6499263 100644 --- a/doc/ionconf/node10.html +++ b/doc/ionconf/node10.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -77,7 +77,6 @@ List of functions
    ioncore.activity_i
    ioncore.bdoc
    ioncore.chdir_for -
    ioncore.clear_tags
    ioncore.clientwin_i
    ioncore.compile_cmd
    ioncore.create_ws @@ -141,9 +140,12 @@ List of functions
    ioncore.snapshot
    ioncore.submap
    ioncore.submenu +
    ioncore.tagged_attach +
    ioncore.tagged_clear
    ioncore.tagged_first
    ioncore.tagged_i
    ioncore.TR +
    ioncore.unsqueeze
    ioncore.version
    ioncore.warn
    ioncore.warn_traced @@ -192,10 +194,11 @@ List of functions
    mod_query.warn
    mod_sp.set_shown
    mod_sp.set_shown_on -
    mod_statusbar.statusbars +
    mod_statusbar.statusbars
    mod_tiling.get
    mod_tiling.mkbottom
    mod_tiling.set +
    mod_tiling.untile
    string.shell_safe
    table.append
    table.copy @@ -259,6 +262,7 @@ List of functions
    WGroup.bottom
    WGroup.is_fullscreen
    WGroup.managed_i +
    WGroup.set_bottom
    WGroup.set_fullscreen
    WGroupWS.attach_framed
    WInfoWin.set_text @@ -273,11 +277,12 @@ List of functions
    WMenu.typeahead_clear
    WMoveresMode.cancel
    WMoveresMode.finish +
    WMoveresMode.geom
    WMoveresMode.move
    WMoveresMode.resize +
    WMoveresMode.rqgeom
    WMPlex.attach
    WMPlex.attach_new -
    WMPlex.attach_tagged
    WMPlex.dec_index
    WMPlex.get_index
    WMPlex.get_stdisp @@ -297,7 +302,9 @@ List of functions
    WRegion.begin_kbresize
    WRegion.current
    WRegion.geom +
    WRegion.get_configuration
    WRegion.goto +
    WRegion.groupleader_of
    WRegion.is_active
    WRegion.is_activity
    WRegion.is_mapped @@ -329,12 +336,12 @@ List of functions
    WSplitSplit.flip
    WSplitSplit.tl
    WSplit.transpose -
    WStatusBar.get_template_table -
    WStatusBar.is_systray_extl -
    WStatusBar.set_systray -
    WStatusBar.set_template -
    WStatusBar.set_template_table -
    WStatusBar.update +
    WStatusBar.get_template_table +
    WStatusBar.is_systray_extl +
    WStatusBar.set_systray +
    WStatusBar.set_template +
    WStatusBar.set_template_table +
    WStatusBar.update
    WTiling.farthest
    WTiling.flip_at
    WTiling.managed_i @@ -354,31 +361,31 @@ List of functions
    diff --git a/doc/ionconf/node11.html b/doc/ionconf/node11.html index 76b0481..4ad6ff2 100644 --- a/doc/ionconf/node11.html +++ b/doc/ionconf/node11.html @@ -28,26 +28,26 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -58,1035 +58,1085 @@ original version by: Nikos Drakos, CBLU, University of Leeds Index
    aboutmsg - : 6.1 + : 6.1
    acrobatic - : 3.5 + : 3.5
    activity_first - : 6.1 + : 6.1
    activity_i - : 6.1 + : 6.1
    Alt - : 3.3.5 + : 3.3.5
    AnyModifier - : 3.3.5 + : 3.3.5
    append - : 6.1.16 -
    aspect - : 3.5 + : 6.1.16 +
    resizeinc + : 3.5.1 + | 3.5.1
    attach - : 6.1.3 - | 6.1.7 - | 6.5.1 + : 6.1.3 + | 6.1.7 + | 6.5.1
    attach_framed - : 6.1.5 + : 6.1.5
    attach_new - : 6.1.3 - | 6.1.7 -
    attach_tagged - : 6.1.7 + : 6.1.3 + | 6.1.7
    back - : 6.3.2 + : 6.3.2
    backspace - : 6.3.2 + : 6.3.2
    bdoc - : 6.1 + : 6.1
    begin_kbresize - : 6.1.9 + : 6.1.9
    bkill_word - : 6.3.2 + : 6.3.2
    bol - : 6.3.2 + : 6.3.2
    bottom - : 6.1.3 + : 6.1.3
    br - : 6.2.4 + : 6.2.4
    bskip_word - : 6.3.2 + : 6.3.2
    Button-n - : 3.3.6 + : 3.3.6
    cancel - : 6.1.8 - | 6.3.3 - | 6.4.1 + : 6.1.8 + | 6.3.3 + | 6.4.1
    chdir_for - : 6.1 + : 6.1
    class
    -
    winprop : 3.5.1 +
    winprop : 3.5.2
    clear_mark - : 6.3.2 -
    clear_tags - : 6.1 + : 6.3.2
    clientwin_do_manage_alt - : 6.8 + : 6.9
    clientwin_i - : 6.1 + : 6.1
    clientwin_mapped_hook - : 6.8 + : 6.9
    clientwin_property_change_hook - : 6.8 + : 6.9
    clientwin_unmapped_hook - : 6.8 + : 6.9
    compile_cmd - : 6.1 + : 6.1
    complete - : 6.3.2 + : 6.3.2
    contents - : 6.3.2 + : 6.3.2
    context - : 6.3.2 + : 6.3.2
    Control - : 3.3.5 + : 3.3.5
    copy - : 6.1.16 - | 6.3.2 + : 6.1.16 + | 6.3.2
    create_ws - : 6.1 + : 6.1
    current - : 6.1 - | 6.1.9 - | 6.2.2 + : 6.1 + | 6.1.9 + | 6.2.2
    current_scr - : 6.1.10 + : 6.1.10
    cut - : 6.3.2 + : 6.3.2
    de
    -
    defstyle : 6.7 -
    defstyle_rootwin : 6.7 -
    reset : 6.7 -
    substyle : 6.7 +
    defstyle : 6.8 +
    defstyle_rootwin : 6.8 +
    reset : 6.8 +
    substyle : 6.8
    dec_index - : 6.1.7 + : 6.1.7
    defbindings - : 6.1 + : 6.1
    defcmd - : 6.3 + : 6.3
    defctxmenu - : 6.1 + : 6.1
    deflayout - : 6.1 + : 6.1
    defmenu - : 3.4.1 - | 6.1 + : 3.4.1 + | 6.1
    defshortening - : 6.1 + : 6.1
    defstyle - : 6.7 + : 6.8
    defstyle_rootwin - : 6.7 + : 6.8
    defwinprop - : 6.1 + : 6.1
    delete - : 6.3.2 + : 6.3.2
    detach - : 6.1 + : 6.1
    dir - : 6.2.4 + : 6.2.4
    drawing engine - : 4.1 + : 4.1
    eol - : 6.3.2 + : 6.3.2
    ETCDIR - : 3.1 + : 3.1
    exec - : 6.1 + : 6.1
    exec_on - : 6.1 + : 6.1
    export - : 6.1.13 + : 6.1.13
    farthest - : 6.2.5 + : 6.2.5
    find_manager - : 6.1 + : 6.1
    find_screen_id - : 6.1 + : 6.1
    finish - : 6.1.8 - | 6.3.2 - | 6.4.1 + : 6.1.8 + | 6.3.2 + | 6.4.1
    flip - : 6.2.4 + : 6.2.4
    flip_at - : 6.2.5 + : 6.2.5
    float - : 3.5 + : 3.5
    focushistory_i - : 6.1 + : 6.1
    forward - : 6.3.2 + : 6.3.2
    frame_managed_changed_hook - : 6.8 + : 6.9
    fullscreen - : 3.5 + : 3.5
    geom - : 6.1.9 - | 6.2.1 + : 6.1.8 + | 6.1.9 + | 6.2.1
    get - : 6.1 - | 6.2 - | 6.3 - | 6.4 - | 6.5.1 + : 6.1 + | 6.2 + | 6.3 + | 6.4 + | 6.5.1 +
    get_configuration + : 6.1.9
    get_dir_for - : 6.1 + : 6.1
    get_ident - : 6.1.1 + : 6.1.1
    get_index - : 6.1.7 + : 6.1.7
    get_paths - : 6.1 + : 6.1
    get_savefile - : 6.1 + : 6.1
    get_stdisp - : 6.1.7 + : 6.1.7 +
    get_template_table + : 6.7.1
    getbindings - : 6.1 + : 6.1
    getctxmenu - : 6.1 + : 6.1
    getlayout - : 6.1 + : 6.1
    getmenu - : 6.1 + : 6.1
    getwinprop - : 6.1 + : 6.1
    goto - : 6.1.9 + : 6.1.9
    goto_activity - : 6.1 + : 6.1
    goto_first - : 6.1 + : 6.1
    goto_next - : 6.1 + : 6.1
    goto_next_screen - : 6.1 + : 6.1
    goto_nth_screen - : 6.1 + : 6.1
    goto_prev_screen - : 6.1 + : 6.1
    goto_previous - : 6.1 + : 6.1
    gr
    -
    read_config : 6.1.14 -
    refresh : 6.1.14 -
    select_engine : 6.1.14 +
    read_config : 6.1.14 +
    refresh : 6.1.14 +
    select_engine : 6.1.14
    grabmenu - : 6.4 + : 6.4 +
    groupleader_of + : 6.1.9
    history_clear - : 6.3 + : 6.3
    history_get - : 6.3 + : 6.3
    history_next - : 6.3.2 + : 6.3.2
    history_prev - : 6.3.2 + : 6.3.2
    history_push - : 6.3 + : 6.3
    history_search - : 6.3 + : 6.3
    history_table - : 6.3 + : 6.3
    icat - : 6.1.16 + : 6.1.16
    id - : 6.1.11 + : 6.1.11 +
    ignore_resizeinc + : 3.5.1 + | 3.5.1
    ignore_cfgrq - : 3.5 + : 3.5 +
    ignore_max_size + : 3.5.1 +
    ignore_min_size + : 3.5.1
    ignore_net_active_window - : 3.5 -
    ignore_resizeinc - : 3.5 + : 3.5
    inc_index - : 6.1.7 + : 6.1.7
    insstr - : 6.3.2 + : 6.3.2
    instance
    -
    winprop : 3.5.1 +
    winprop : 3.5.2
    ioncore
    -
    aboutmsg : 6.1 -
    activity_first : 6.1 -
    activity_i : 6.1 -
    bdoc : 6.1 -
    chdir_for : 6.1 -
    clear_tags : 6.1 -
    clientwin_i : 6.1 -
    compile_cmd : 6.1 -
    create_ws : 6.1 -
    current : 6.1 -
    defbindings : 6.1 -
    defctxmenu : 6.1 -
    deflayout : 6.1 -
    defmenu : 6.1 -
    defshortening : 6.1 -
    defwinprop : 6.1 -
    detach : 6.1 -
    exec : 6.1 -
    exec_on : 6.1 -
    find_manager : 6.1 -
    find_screen_id : 6.1 -
    focushistory_i : 6.1 -
    get : 6.1 -
    get_dir_for : 6.1 -
    get_paths : 6.1 -
    get_savefile : 6.1 -
    getbindings : 6.1 -
    getctxmenu : 6.1 -
    getlayout : 6.1 -
    getmenu : 6.1 -
    getwinprop : 6.1 -
    goto_activity : 6.1 -
    goto_first : 6.1 -
    goto_next : 6.1 -
    goto_next_screen : 6.1 -
    goto_nth_screen : 6.1 -
    goto_prev_screen : 6.1 -
    goto_previous : 6.1 -
    is_i18n : 6.1 -
    kpress : 6.1 -
    kpress_wait : 6.1 -
    load_module : 6.1 -
    lookup_clientwin : 6.1 -
    lookup_region : 6.1 -
    lookup_script : 6.1 -
    match_winprop_name : 6.1 -
    mclick : 6.1 -
    mdblclick : 6.1 -
    mdrag : 6.1 -
    menuentry : 6.1 -
    mpress : 6.1 -
    navi_first : 6.1 -
    navi_next : 6.1 -
    popen_bgread : 6.1 -
    progname : 6.1 -
    read_savefile : 6.1 -
    refresh_stylelist : 6.1 -
    region_i : 6.1 -
    request_selection : 6.1 -
    resign : 6.1 -
    restart : 6.1 -
    restart_other : 6.1 -
    set : 6.1 -
    set_paths : 6.1 -
    set_selection : 6.1 -
    shutdown : 6.1 -
    snapshot : 6.1 -
    submap : 6.1 -
    submenu : 6.1 -
    tagged_first : 6.1 -
    tagged_i : 6.1 -
    TR : 6.1 -
    version : 6.1 -
    warn : 6.1 -
    warn_traced : 6.1 -
    write_savefile : 6.1 -
    x_change_property : 6.1 -
    x_delete_property : 6.1 -
    x_get_atom_name : 6.1 -
    x_get_text_property : 6.1 -
    x_get_window_property : 6.1 -
    x_intern_atom : 6.1 -
    x_set_text_property : 6.1 +
    aboutmsg : 6.1 +
    activity_first : 6.1 +
    activity_i : 6.1 +
    bdoc : 6.1 +
    chdir_for : 6.1 +
    clientwin_i : 6.1 +
    compile_cmd : 6.1 +
    create_ws : 6.1 +
    current : 6.1 +
    defbindings : 6.1 +
    defctxmenu : 6.1 +
    deflayout : 6.1 +
    defmenu : 6.1 +
    defshortening : 6.1 +
    defwinprop : 6.1 +
    detach : 6.1 +
    exec : 6.1 +
    exec_on : 6.1 +
    find_manager : 6.1 +
    find_screen_id : 6.1 +
    focushistory_i : 6.1 +
    get : 6.1 +
    get_dir_for : 6.1 +
    get_paths : 6.1 +
    get_savefile : 6.1 +
    getbindings : 6.1 +
    getctxmenu : 6.1 +
    getlayout : 6.1 +
    getmenu : 6.1 +
    getwinprop : 6.1 +
    goto_activity : 6.1 +
    goto_first : 6.1 +
    goto_next : 6.1 +
    goto_next_screen : 6.1 +
    goto_nth_screen : 6.1 +
    goto_prev_screen : 6.1 +
    goto_previous : 6.1 +
    is_i18n : 6.1 +
    kpress : 6.1 +
    kpress_wait : 6.1 +
    load_module : 6.1 +
    lookup_clientwin : 6.1 +
    lookup_region : 6.1 +
    lookup_script : 6.1 +
    match_winprop_name : 6.1 +
    mclick : 6.1 +
    mdblclick : 6.1 +
    mdrag : 6.1 +
    menuentry : 6.1 +
    mpress : 6.1 +
    navi_first : 6.1 +
    navi_next : 6.1 +
    popen_bgread : 6.1 +
    progname : 6.1 +
    read_savefile : 6.1 +
    refresh_stylelist : 6.1 +
    region_i : 6.1 +
    request_selection : 6.1 +
    resign : 6.1 +
    restart : 6.1 +
    restart_other : 6.1 +
    set : 6.1 +
    set_paths : 6.1 +
    set_selection : 6.1 +
    shutdown : 6.1 +
    snapshot : 6.1 +
    submap : 6.1 +
    submenu : 6.1 +
    tagged_attach : 6.1 +
    tagged_clear : 6.1 +
    tagged_first : 6.1 +
    tagged_i : 6.1 +
    TR : 6.1 +
    unsqueeze : 6.1 +
    version : 6.1 +
    warn : 6.1 +
    warn_traced : 6.1 +
    write_savefile : 6.1 +
    x_change_property : 6.1 +
    x_delete_property : 6.1 +
    x_get_atom_name : 6.1 +
    x_get_text_property : 6.1 +
    x_get_window_property : 6.1 +
    x_intern_atom : 6.1 +
    x_set_text_property : 6.1
    ioncore_deinit_hook - : 6.8 + : 6.9
    ioncore_post_layout_setup_hook - : 6.8 + : 6.9
    ioncore_sigchld_hook - : 6.8 + : 6.9
    ioncore_snapshot_hook - : 6.8 + : 6.9
    is_active - : 6.1.9 + : 6.1.9
    is_activity - : 6.1.9 + : 6.1.9
    is_fullscreen - : 6.1.3 + : 6.1.3
    is_hidden - : 6.1.7 + : 6.1.7
    is_histcompl - : 6.3.2 + : 6.3.2
    is_i18n - : 6.1 + : 6.1
    is_mapped - : 6.1.9 + : 6.1.9
    is_shaded - : 6.1.2 + : 6.1.2 +
    is_systray_extl + : 6.7.1
    is_tagged - : 6.1.9 + : 6.1.9
    join - : 6.1.16 + : 6.1.16
    jumpto - : 3.5 + : 3.5
    keysymdef.h - : 3.3.5 + : 3.3.5
    kill - : 6.1.1 + : 6.1.1
    kill_line - : 6.3.2 + : 6.3.2
    kill_to_bol - : 6.3.2 + : 6.3.2
    kill_to_eol - : 6.3.2 + : 6.3.2
    kill_word - : 6.3.2 + : 6.3.2
    kpress - : 6.1 + : 6.1
    kpress_wait - : 6.1 + : 6.1
    load_module - : 6.1 + : 6.1
    Lock - : 3.3.5 + : 3.3.5
    lookup_clientwin - : 6.1 + : 6.1
    lookup_region - : 6.1 + : 6.1
    lookup_script - : 6.1 + : 6.1
    managed_i - : 6.1.3 - | 6.1.7 - | 6.2.5 + : 6.1.3 + | 6.1.7 + | 6.2.5
    manager : 2.2.2.1 - | 6.1.9 + | 6.1.9
    map - : 6.1.16 + : 6.1.16
    mark - : 6.3.2 + : 6.3.2
    match_winprop_name - : 6.1 + : 6.1
    max_size - : 3.5 + : 3.5.1
    maximize_horiz - : 6.1.2 + : 6.1.2
    maximize_vert - : 6.1.2 + : 6.1.2
    mclick - : 6.1 + : 6.1
    mdblclick - : 6.1 + : 6.1
    mdrag - : 6.1 + : 6.1
    menu - : 6.4 + : 6.4
    menuentry - : 3.4.1 - | 6.1 + : 3.4.1 + | 6.1
    menus - : 3.4.1 + : 3.4.1
    message - : 6.3 + : 6.3
    min_size - : 3.5 + : 3.5.1
    mkbottom - : 6.2 + : 6.2
    mod_dock
    -
    set_floating_shown_on : 6.5 +
    set_floating_shown_on : 6.5
    mod_menu
    -
    get : 6.4 -
    grabmenu : 6.4 -
    menu : 6.4 -
    pmenu : 6.4 -
    set : 6.4 +
    get : 6.4 +
    grabmenu : 6.4 +
    menu : 6.4 +
    pmenu : 6.4 +
    set : 6.4
    mod_query
    -
    defcmd : 6.3 -
    get : 6.3 -
    history_clear : 6.3 -
    history_get : 6.3 -
    history_push : 6.3 -
    history_search : 6.3 -
    history_table : 6.3 -
    message : 6.3 -
    popen_completions : 6.3 -
    query : 6.3 -
    query_attachclient : 6.3 -
    query_editfile : 6.3 -
    query_exec : 6.3 -
    query_gotoclient : 6.3 -
    query_lua : 6.3 -
    query_man : 6.3 -
    query_menu : 6.3 -
    query_renameframe : 6.3 -
    query_renameworkspace : 6.3 -
    query_restart : 6.3 -
    query_runfile : 6.3 -
    query_shutdown : 6.3 -
    query_ssh : 6.3 -
    query_workspace : 6.3 -
    query_yesno : 6.3 -
    set : 6.3 -
    show_about_ion : 6.3 -
    show_tree : 6.3 -
    warn : 6.3 +
    defcmd : 6.3 +
    get : 6.3 +
    history_clear : 6.3 +
    history_get : 6.3 +
    history_push : 6.3 +
    history_search : 6.3 +
    history_table : 6.3 +
    message : 6.3 +
    popen_completions : 6.3 +
    query : 6.3 +
    query_attachclient : 6.3 +
    query_editfile : 6.3 +
    query_exec : 6.3 +
    query_gotoclient : 6.3 +
    query_lua : 6.3 +
    query_man : 6.3 +
    query_menu : 6.3 +
    query_renameframe : 6.3 +
    query_renameworkspace : 6.3 +
    query_restart : 6.3 +
    query_runfile : 6.3 +
    query_shutdown : 6.3 +
    query_ssh : 6.3 +
    query_workspace : 6.3 +
    query_yesno : 6.3 +
    set : 6.3 +
    show_about_ion : 6.3 +
    show_tree : 6.3 +
    warn : 6.3
    mod_sp
    -
    set_shown : 6.6 -
    set_shown_on : 6.6 +
    set_shown : 6.6 +
    set_shown_on : 6.6 +
    +
    mod_statusbar
    +
    statusbars : 6.7
    mod_tiling
    -
    get : 6.2 -
    mkbottom : 6.2 -
    set : 6.2 +
    get : 6.2 +
    mkbottom : 6.2 +
    set : 6.2 +
    untile : 6.2
    mode - : 6.1.2 + : 6.1.2
    ModN - : 3.3.5 + : 3.3.5
    move - : 6.1.8 + : 6.1.8
    mpress - : 6.1 + : 6.1
    mx_count - : 6.1.7 + : 6.1.7
    mx_current - : 6.1.7 + : 6.1.7
    mx_i - : 6.1.7 + : 6.1.7
    mx_nth - : 6.1.7 + : 6.1.7
    name - : 6.1.9 + : 6.1.9
    navi_first - : 6.1 + : 6.1
    navi_next - : 6.1 + : 6.1
    new_group - : 3.5 + : 3.5
    next_completion - : 6.3.2 + : 6.3.2
    nextto - : 6.2.5 + : 6.2.5
    node_of - : 6.2.5 + : 6.2.5
    nudge - : 6.1.1 + : 6.1.1
    NumLock - : 3.3.5 + : 3.3.5
    Obj : 2.2.1
    oneshot - : 3.5 + : 3.5
    p_move - : 6.1.12 + : 6.1.12
    p_resize - : 6.1.12 + : 6.1.12
    p_switch_tab - : 6.1.2 + : 6.1.2
    p_tabdrag - : 6.1.2 + : 6.1.2
    parent : 2.2.2.1 - | 6.1.9 - | 6.2.1 + | 6.1.9 + | 6.2.1
    paste - : 6.3.2 + : 6.3.2
    pmenu - : 6.4 + : 6.4
    point - : 6.3.2 + : 6.3.2
    popen_bgread - : 6.1 + : 6.1
    popen_completions - : 6.3 + : 6.3
    PREFIX - : 3.1 + : 3.1
    prev_completion - : 6.3.2 + : 6.3.2
    progname - : 6.1 + : 6.1
    query - : 6.3 + : 6.3
    query_attachclient - : 6.3 + : 6.3
    query_editfile - : 6.3 + : 6.3
    query_exec - : 6.3 + : 6.3
    query_gotoclient - : 6.3 + : 6.3
    query_lua - : 6.3 + : 6.3
    query_man - : 6.3 + : 6.3
    query_menu - : 6.3 + : 6.3
    query_renameframe - : 6.3 + : 6.3
    query_renameworkspace - : 6.3 + : 6.3
    query_restart - : 6.3 + : 6.3
    query_runfile - : 6.3 + : 6.3
    query_shutdown - : 6.3 + : 6.3
    query_ssh - : 6.3 + : 6.3
    query_workspace - : 6.3 + : 6.3
    query_yesno - : 6.3 + : 6.3
    quote_next - : 6.1.1 + : 6.1.1
    read_config - : 6.1.14 + : 6.1.14
    read_savefile - : 6.1 + : 6.1
    refresh - : 6.1.14 + : 6.1.14
    refresh_stylelist - : 6.1 + : 6.1
    reg - : 6.2.3 + : 6.2.3
    region_do_warp_alt - : 6.8 + : 6.9
    region_i - : 6.1 + : 6.1
    region_notify_hook - : 6.8 + : 6.9
    request_selection - : 6.1 + : 6.1
    reset - : 6.7 + : 6.8
    resign - : 6.1 + : 6.1
    resize - : 6.1.8 - | 6.5.1 + : 6.1.8 + | 6.5.1
    restart - : 6.1 + : 6.1
    restart_other - : 6.1 + : 6.1
    role
    -
    winprop : 3.5.1 +
    winprop : 3.5.2
    root window : 2.2.1
    rootwin_of - : 6.1.9 + : 6.1.9
    rqclose - : 6.1.9 + : 6.1.9
    rqclose_propagate - : 6.1.9 + : 6.1.9
    rqgeom - : 6.1.9 - | 6.2.1 + : 6.1.8 + | 6.1.9 + | 6.2.1
    rqorder - : 6.1.9 + : 6.1.9
    screen
    physical : 2.2.1
    X : 2.2.1
    screen_managed_changed_hook - : 6.8 + : 6.9
    screen_of - : 6.1.9 + : 6.1.9
    scrolldown - : 6.3.3 + : 6.3.3
    ScrollLock - : 3.3.5 + : 3.3.5
    scrollup - : 6.3.3 + : 6.3.3
    select_engine - : 6.1.14 + : 6.1.14
    select_next - : 6.4.1 + : 6.4.1
    select_nth - : 6.4.1 + : 6.4.1
    select_prev - : 6.4.1 + : 6.4.1
    set - : 6.1 - | 6.2 - | 6.3 - | 6.4 - | 6.5.1 + : 6.1 + | 6.2 + | 6.3 + | 6.4 + | 6.5.1
    set_activity - : 6.1.9 + : 6.1.9 +
    set_bottom + : 6.1.3
    set_completions - : 6.3.1 + : 6.3.1
    set_context - : 6.3.2 + : 6.3.2
    set_floating - : 6.2.5 + : 6.2.5
    set_floating_at - : 6.2.5 + : 6.2.5
    set_floating_shown_on - : 6.5 + : 6.5
    set_fullscreen - : 6.1.3 + : 6.1.3
    set_hidden - : 6.1.7 + : 6.1.7
    set_index - : 6.1.7 + : 6.1.7
    set_managed_offset - : 6.1.11 + : 6.1.11
    set_mark - : 6.3.2 + : 6.3.2
    set_mode - : 6.1.2 + : 6.1.2
    set_name - : 6.1.9 + : 6.1.9
    set_name_exact - : 6.1.9 + : 6.1.9
    set_numbers - : 6.1.2 + : 6.1.2
    set_paths - : 6.1 + : 6.1
    set_selection - : 6.1 + : 6.1
    set_shaded - : 6.1.2 + : 6.1.2
    set_shown - : 6.6 + : 6.6
    set_shown_on - : 6.6 + : 6.6
    set_stdisp - : 6.1.7 + : 6.1.7 +
    set_systray + : 6.7.1
    set_tagged - : 6.1.9 + : 6.1.9 +
    set_template + : 6.7.1 +
    set_template_table + : 6.7.1
    set_text - : 6.1.6 + : 6.1.6
    shell_safe - : 6.1.15 + : 6.1.15
    Shift - : 3.3.5 + : 3.3.5
    show_about_ion - : 6.3 + : 6.3
    show_tree - : 6.3 + : 6.3
    shutdown - : 6.1 + : 6.1
    size_hints - : 6.1.9 + : 6.1.9
    skip_word - : 6.3.2 + : 6.3.2
    snapshot - : 6.1 + : 6.1
    split - : 6.2.5 + : 6.2.5
    split_at - : 6.2.5 + : 6.2.5
    split_top - : 6.2.5 + : 6.2.5
    split_tree - : 6.2.5 + : 6.2.5
    statusbar - : 3.5 + : 3.5 +
    statusbars + : 6.7
    string
    -
    shell_safe : 6.1.15 +
    shell_safe : 6.1.15
    style - : 4.1 + : 4.1
    submap - : 6.1 + : 6.1
    submenu - : 3.4.1 - | 6.1 + : 3.4.1 + | 6.1
    substyle - : 4.1 - | 6.7 + : 4.1 + | 6.8
    switch_next - : 6.1.7 + : 6.1.7
    switch_nth - : 6.1.7 + : 6.1.7
    switch_prev - : 6.1.7 + : 6.1.7
    switchto - : 3.5 + : 3.5
    system.mk - : 3.1 + : 3.1
    table
    -
    append : 6.1.16 -
    copy : 6.1.16 -
    icat : 6.1.16 -
    join : 6.1.16 -
    map : 6.1.16 +
    append : 6.1.16 +
    copy : 6.1.16 +
    icat : 6.1.16 +
    join : 6.1.16 +
    map : 6.1.16
    +
    tagged_attach + : 6.1 +
    tagged_clear + : 6.1
    tagged_first - : 6.1 + : 6.1
    tagged_i - : 6.1 + : 6.1
    target - : 3.5 + : 3.5
    tiling_placement_alt - : 6.8 + : 6.9
    tl - : 6.2.4 + : 6.2.4
    TR - : 6.1 + : 6.1
    transient - : 3.5.2 + : 3.5.3
    transient_mode - : 3.5 -
    transients_at_top - : 3.5 + : 3.5
    transparent - : 3.5 + : 3.5
    transpose - : 6.2.1 + : 6.2.1
    transpose_at - : 6.2.5 + : 6.2.5
    transpose_chars - : 6.3.2 + : 6.3.2
    transpose_words - : 6.3.2 + : 6.3.2
    typeahead_clear - : 6.4.1 + : 6.4.1
    unsplit_at - : 6.2.5 + : 6.2.5 +
    unsqueeze + : 6.1 +
    untile + : 6.2 +
    update + : 6.7.1 +
    userpos + : 3.5.1
    version - : 6.1 + : 6.1
    warn - : 6.1 - | 6.3 + : 6.1 + | 6.3
    warn_traced - : 6.1 + : 6.1
    WClientWin : 2.2.1
    -
    get_ident : 6.1.1 -
    kill : 6.1.1 -
    nudge : 6.1.1 -
    quote_next : 6.1.1 -
    xid : 6.1.1 +
    get_ident : 6.1.1 +
    kill : 6.1.1 +
    nudge : 6.1.1 +
    quote_next : 6.1.1 +
    xid : 6.1.1
    WComplProxy
    -
    set_completions : 6.3.1 +
    set_completions : 6.3.1
    WDock
    -
    attach : 6.5.1 -
    get : 6.5.1 -
    resize : 6.5.1 -
    set : 6.5.1 +
    attach : 6.5.1 +
    get : 6.5.1 +
    resize : 6.5.1 +
    set : 6.5.1
    WEdln : 2.2.1
    -
    back : 6.3.2 -
    backspace : 6.3.2 -
    bkill_word : 6.3.2 -
    bol : 6.3.2 -
    bskip_word : 6.3.2 -
    clear_mark : 6.3.2 -
    complete : 6.3.2 -
    contents : 6.3.2 -
    context : 6.3.2 -
    copy : 6.3.2 -
    cut : 6.3.2 -
    delete : 6.3.2 -
    eol : 6.3.2 -
    finish : 6.3.2 -
    forward : 6.3.2 -
    history_next : 6.3.2 -
    history_prev : 6.3.2 -
    insstr : 6.3.2 -
    is_histcompl : 6.3.2 -
    kill_line : 6.3.2 -
    kill_to_bol : 6.3.2 -
    kill_to_eol : 6.3.2 -
    kill_word : 6.3.2 -
    mark : 6.3.2 -
    next_completion : 6.3.2 -
    paste : 6.3.2 -
    point : 6.3.2 -
    prev_completion : 6.3.2 -
    set_context : 6.3.2 -
    set_mark : 6.3.2 -
    skip_word : 6.3.2 -
    transpose_chars : 6.3.2 -
    transpose_words : 6.3.2 +
    back : 6.3.2 +
    backspace : 6.3.2 +
    bkill_word : 6.3.2 +
    bol : 6.3.2 +
    bskip_word : 6.3.2 +
    clear_mark : 6.3.2 +
    complete : 6.3.2 +
    contents : 6.3.2 +
    context : 6.3.2 +
    copy : 6.3.2 +
    cut : 6.3.2 +
    delete : 6.3.2 +
    eol : 6.3.2 +
    finish : 6.3.2 +
    forward : 6.3.2 +
    history_next : 6.3.2 +
    history_prev : 6.3.2 +
    insstr : 6.3.2 +
    is_histcompl : 6.3.2 +
    kill_line : 6.3.2 +
    kill_to_bol : 6.3.2 +
    kill_to_eol : 6.3.2 +
    kill_word : 6.3.2 +
    mark : 6.3.2 +
    next_completion : 6.3.2 +
    paste : 6.3.2 +
    point : 6.3.2 +
    prev_completion : 6.3.2 +
    set_context : 6.3.2 +
    set_mark : 6.3.2 +
    skip_word : 6.3.2 +
    transpose_chars : 6.3.2 +
    transpose_words : 6.3.2
    WFrame : 2.2.1
    -
    is_shaded : 6.1.2 -
    maximize_horiz : 6.1.2 -
    maximize_vert : 6.1.2 -
    mode : 6.1.2 -
    p_switch_tab : 6.1.2 -
    p_tabdrag : 6.1.2 -
    set_mode : 6.1.2 -
    set_numbers : 6.1.2 -
    set_shaded : 6.1.2 +
    is_shaded : 6.1.2 +
    maximize_horiz : 6.1.2 +
    maximize_vert : 6.1.2 +
    mode : 6.1.2 +
    p_switch_tab : 6.1.2 +
    p_tabdrag : 6.1.2 +
    set_mode : 6.1.2 +
    set_numbers : 6.1.2 +
    set_shaded : 6.1.2
    WGroup : 2.2.1
    -
    attach : 6.1.3 -
    attach_new : 6.1.3 -
    bottom : 6.1.3 -
    is_fullscreen : 6.1.3 -
    managed_i : 6.1.3 -
    set_fullscreen : 6.1.3 +
    attach : 6.1.3 +
    attach_new : 6.1.3 +
    bottom : 6.1.3 +
    is_fullscreen : 6.1.3 +
    managed_i : 6.1.3 +
    set_bottom : 6.1.3 +
    set_fullscreen : 6.1.3
    WGroupCW : 2.2.1
    WGroupWS : 2.2.1
    -
    attach_framed : 6.1.5 +
    attach_framed : 6.1.5
    WInfoWin
    -
    set_text : 6.1.6 +
    set_text : 6.1.6
    Winprops - : 3.5 + : 3.5
    WInput : 2.2.1
    -
    cancel : 6.3.3 -
    scrolldown : 6.3.3 -
    scrollup : 6.3.3 +
    cancel : 6.3.3 +
    scrolldown : 6.3.3 +
    scrollup : 6.3.3
    WMenu
    -
    cancel : 6.4.1 -
    finish : 6.4.1 -
    select_next : 6.4.1 -
    select_nth : 6.4.1 -
    select_prev : 6.4.1 -
    typeahead_clear : 6.4.1 +
    cancel : 6.4.1 +
    finish : 6.4.1 +
    select_next : 6.4.1 +
    select_nth : 6.4.1 +
    select_prev : 6.4.1 +
    typeahead_clear : 6.4.1
    WMessage : 2.2.1
    WMoveresMode
    -
    cancel : 6.1.8 -
    finish : 6.1.8 -
    move : 6.1.8 -
    resize : 6.1.8 +
    cancel : 6.1.8 +
    finish : 6.1.8 +
    geom : 6.1.8 +
    move : 6.1.8 +
    resize : 6.1.8 +
    rqgeom : 6.1.8
    WMPlex
    -
    attach : 6.1.7 -
    attach_new : 6.1.7 -
    attach_tagged : 6.1.7 -
    dec_index : 6.1.7 -
    get_index : 6.1.7 -
    get_stdisp : 6.1.7 -
    inc_index : 6.1.7 -
    is_hidden : 6.1.7 -
    managed_i : 6.1.7 -
    mx_count : 6.1.7 -
    mx_current : 6.1.7 -
    mx_i : 6.1.7 -
    mx_nth : 6.1.7 -
    set_hidden : 6.1.7 -
    set_index : 6.1.7 -
    set_stdisp : 6.1.7 -
    switch_next : 6.1.7 -
    switch_nth : 6.1.7 -
    switch_prev : 6.1.7 +
    attach : 6.1.7 +
    attach_new : 6.1.7 +
    dec_index : 6.1.7 +
    get_index : 6.1.7 +
    get_stdisp : 6.1.7 +
    inc_index : 6.1.7 +
    is_hidden : 6.1.7 +
    managed_i : 6.1.7 +
    mx_count : 6.1.7 +
    mx_current : 6.1.7 +
    mx_i : 6.1.7 +
    mx_nth : 6.1.7 +
    set_hidden : 6.1.7 +
    set_index : 6.1.7 +
    set_stdisp : 6.1.7 +
    switch_next : 6.1.7 +
    switch_nth : 6.1.7 +
    switch_prev : 6.1.7
    WRegion : 2.2.1
    -
    begin_kbresize : 6.1.9 -
    current : 6.1.9 -
    geom : 6.1.9 -
    goto : 6.1.9 -
    is_active : 6.1.9 -
    is_activity : 6.1.9 -
    is_mapped : 6.1.9 -
    is_tagged : 6.1.9 -
    manager : 6.1.9 -
    name : 6.1.9 -
    parent : 6.1.9 -
    rootwin_of : 6.1.9 -
    rqclose : 6.1.9 -
    rqclose_propagate : 6.1.9 -
    rqgeom : 6.1.9 -
    rqorder : 6.1.9 -
    screen_of : 6.1.9 -
    set_activity : 6.1.9 -
    set_name : 6.1.9 -
    set_name_exact : 6.1.9 -
    set_tagged : 6.1.9 -
    size_hints : 6.1.9 +
    begin_kbresize : 6.1.9 +
    current : 6.1.9 +
    geom : 6.1.9 +
    get_configuration : 6.1.9 +
    goto : 6.1.9 +
    groupleader_of : 6.1.9 +
    is_active : 6.1.9 +
    is_activity : 6.1.9 +
    is_mapped : 6.1.9 +
    is_tagged : 6.1.9 +
    manager : 6.1.9 +
    name : 6.1.9 +
    parent : 6.1.9 +
    rootwin_of : 6.1.9 +
    rqclose : 6.1.9 +
    rqclose_propagate : 6.1.9 +
    rqgeom : 6.1.9 +
    rqorder : 6.1.9 +
    screen_of : 6.1.9 +
    set_activity : 6.1.9 +
    set_name : 6.1.9 +
    set_name_exact : 6.1.9 +
    set_tagged : 6.1.9 +
    size_hints : 6.1.9
    write_savefile - : 6.1 + : 6.1
    WRootWin : 2.2.1
    -
    current_scr : 6.1.10 +
    current_scr : 6.1.10
    WScreen : 2.2.1
    -
    id : 6.1.11 -
    set_managed_offset : 6.1.11 +
    id : 6.1.11 +
    set_managed_offset : 6.1.11
    WSplit : 2.2.1
    -
    geom : 6.2.1 -
    parent : 6.2.1 -
    rqgeom : 6.2.1 -
    transpose : 6.2.1 +
    geom : 6.2.1 +
    parent : 6.2.1 +
    rqgeom : 6.2.1 +
    transpose : 6.2.1
    WSplitInner
    -
    current : 6.2.2 +
    current : 6.2.2
    WSplitRegion
    -
    reg : 6.2.3 +
    reg : 6.2.3
    WSplitSplit
    -
    br : 6.2.4 -
    dir : 6.2.4 -
    flip : 6.2.4 -
    tl : 6.2.4 +
    br : 6.2.4 +
    dir : 6.2.4 +
    flip : 6.2.4 +
    tl : 6.2.4 +
    +
    WStatusBar
    +
    get_template_table : 6.7.1 +
    is_systray_extl : 6.7.1 +
    set_systray : 6.7.1 +
    set_template : 6.7.1 +
    set_template_table : 6.7.1 +
    update : 6.7.1
    WTiling : 2.2.1
    -
    farthest : 6.2.5 -
    flip_at : 6.2.5 -
    managed_i : 6.2.5 -
    nextto : 6.2.5 -
    node_of : 6.2.5 -
    set_floating : 6.2.5 -
    set_floating_at : 6.2.5 -
    split : 6.2.5 -
    split_at : 6.2.5 -
    split_top : 6.2.5 -
    split_tree : 6.2.5 -
    transpose_at : 6.2.5 -
    unsplit_at : 6.2.5 +
    farthest : 6.2.5 +
    flip_at : 6.2.5 +
    managed_i : 6.2.5 +
    nextto : 6.2.5 +
    node_of : 6.2.5 +
    set_floating : 6.2.5 +
    set_floating_at : 6.2.5 +
    split : 6.2.5 +
    split_at : 6.2.5 +
    split_top : 6.2.5 +
    split_tree : 6.2.5 +
    transpose_at : 6.2.5 +
    unsplit_at : 6.2.5
    WWindow : 2.2.1
    -
    p_move : 6.1.12 -
    p_resize : 6.1.12 -
    xid : 6.1.12 +
    p_move : 6.1.12 +
    p_resize : 6.1.12 +
    xid : 6.1.12
    x_change_property - : 6.1 + : 6.1
    x_delete_property - : 6.1 + : 6.1
    x_get_atom_name - : 6.1 + : 6.1
    x_get_text_property - : 6.1 + : 6.1
    x_get_window_property - : 6.1 + : 6.1
    x_intern_atom - : 6.1 + : 6.1
    x_set_text_property - : 6.1 + : 6.1
    xid - : 6.1.1 - | 6.1.12 + : 6.1.1 + | 6.1.12
    Xinerama : 2.2.1
    xmodmap - : 3.3.5 + : 3.3.5
    xprop - : 3.5.2 + : 3.5.3
    diff --git a/doc/ionconf/node12.html b/doc/ionconf/node12.html index b55a763..0bbefa4 100644 --- a/doc/ionconf/node12.html +++ b/doc/ionconf/node12.html @@ -27,26 +27,26 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -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-02-03 +The translation was initiated by tuomov on 2007-03-18


    diff --git a/doc/ionconf/node2.html b/doc/ionconf/node2.html index 9d85352..daebdf4 100644 --- a/doc/ionconf/node2.html +++ b/doc/ionconf/node2.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -131,31 +131,31 @@ listing of all these functions. diff --git a/doc/ionconf/node3.html b/doc/ionconf/node3.html index cc7578a..63c2666 100644 --- a/doc/ionconf/node3.html +++ b/doc/ionconf/node3.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -61,22 +61,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -453,10 +453,12 @@ Most common manager-managed relations | |--> WClientWin |-->WGroupWSs for workspaces | |-->WTiling - | | |-->possibly a WEdln, WMessage or WMenu | | |-->WFrames - | | |-->WGroupCWs (with contents as above) + | | | |-->WGroupCWs (with contents as above) + | | |-->possibly a WStatusBar or WDock | |-->WFrames for floating content + | |-->possibly a WEdln, WMessage or WMenu + | |-->possibly a WStatusBar or WDock (if no tiling) |-->WFrames for sticky stuff, such as the scratchpad @@ -510,31 +512,31 @@ consideration: diff --git a/doc/ionconf/node4.html b/doc/ionconf/node4.html index d156abd..0aab7cc 100644 --- a/doc/ionconf/node4.html +++ b/doc/ionconf/node4.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -61,58 +61,60 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections
    @@ -153,9 +155,9 @@ explained. For a reference on exported functions, see section Ion3, to which document applies, stores its stock configuration files in /usr/local/etc/ion3/ unless you, the OS package maintainer or whoever installed the package on the system has modified the variables -PREFIX or -ETCDIR in -system.mk before compiling Ion. +PREFIX or +ETCDIR in +system.mk before compiling Ion. In the first case you probably know where to find the files and in the other case the system administrator or the OS package maintainer should have provided documentation to point to the correct location. @@ -199,6 +201,9 @@ files: Settings to get some applications behave more nicely have been collected here. See section 3.5. +cfg_layouts.lua +Some workspace layouts are defined here. + cfg_tiling.lua cfg_query.lua cfg_menu.lua @@ -270,15 +275,26 @@ The first of these two settings enables opaque resize mode: in move/resize move frames and other objects mirror you actions immediately. If opaque resize is disabled, a XOR rubber band is shown during the mode instead. This will, unfortunately, cause Ion to also grab the X server and has some -side effects. +side effects. + +

    +There are some other options as well; see the documentation +for ioncore.set for details.

    -Next we load the configuration for Ion's core, and some kludges: +As a next step, in the actual cfg_ion.lua file, we load +cfg_defaults.lua. However, it is merely a conveniency file for +doing exactly what we will going through below, and what is commented +out in the actual file. If you do not want to load what +cfg_defaults.lua loads, just comment out the corresponding +line, and uncomment the lines for the files that you want:

    +--dopath("cfg_defaults")
     dopath("cfg_ioncore")
     dopath("cfg_kludges")
    +dopath("cfg_layouts")
     

    @@ -298,6 +314,8 @@ expression that is used to match against the title and the next is a rule to construct a new title of a match occurs. This particular rule is used to shorten e.g. 'Foo: barbaz<3>' to 'barba...<3>'; for details see the function reference entry for ioncore.defshortening. +Finally, cfg_layouts.lua defines some workspace layouts, available +through the F9 workspace creation query.

    To actually be able to do something besides display windows in full screen @@ -305,22 +323,14 @@ mode, we must next load some modules:

    -dopath("cfg_modules")
    ---dopath("mod_query")
    ---dopath("mod_menu")
    ---dopath("mod_tiling")
    ---dopath("mod_statusbar")
    +dopath("mod_query")
    +dopath("mod_menu")
    +dopath("mod_tiling")
    +dopath("mod_statusbar")
     --dopath("mod_dock")
    ---dopath("mod_sp")
    +dopath("mod_sp")
     
    -

    -We actually load there another file listing the default selection of -modules. If you only want to load additional modules, just uncomment -the corresponding line. If you want to disable loading some modules, -comment out the the line loading cfg_modules, and uncomment -the lines for the modules you want, or add more. -

    @@ -573,8 +583,8 @@ defbindings("WFrame", { As seen above, the functions that create key binding specifications require a keyspec argument. This argument should be a string containing the name of a key as listed in the X header file keysymdef.h3.1 without the XK_ prefix. - + HREF="#foot871">3.1 without the XK_ prefix. + Most of the key names are quite intuitive while some are not. For example, the Enter key on the main part of the keyboard has the less common name Return while the one the numpad is called KP_Enter. @@ -586,23 +596,23 @@ modifiers:
    Shift, Control, Mod1 to Mod5, AnyModifier and Lock. - - - - - + + + + +

    X allows binding all of these modifiers to almost any key and while this list of modifiers does not explicitly list keys such as -Alt that are common on modern keyboards, such +Alt that are common on modern keyboards, such keys are bound to one of the ModN. On systems running XFree86 Alt is usually Mod1. On Suns Mod1 is the diamond key and Alt something else. One of the ''flying window'' keys on so called Windows-keyboards is probably mapped to Mod3 if you have -such a key. Use the program xmodmap +such a key. Use the program xmodmap to find out what exactly is bound where.

    @@ -614,10 +624,10 @@ default.

    Ion ignores the Lock modifier and any ModN () -bound to NumLock or -ScrollLock +bound to NumLock or +ScrollLock by default because such3.2 locking keys may otherwise + HREF="#foot850">3.2 locking keys may otherwise cause confusion.

    @@ -630,7 +640,7 @@ cause confusion. Button specifications are similar to key definitions but now instead of specifying modifiers and a key, you specify modifiers and one of the button names Button1 to -Button5. Additionally the +Button5. Additionally the specification may end with an optional area name following an @-sign. Only frames currently support areas, and the supported values in this case are @@ -681,10 +691,10 @@ to it is available virtually everywhere.

    - - - - + + + + In the stock configuration file setup, menus are defined in the file cfg_menus.lua as previously mentioned. The mod_menu module must be loaded for one to be able to define menus, and this is done with @@ -821,7 +831,7 @@ handlers (and elsewhere): after which the selected entry is activated. This function is meant to be used for implementing, for example, Win***s-style Alt-Tab handling.3.3 + HREF="#foot1188">3.3 @@ -849,7 +859,7 @@ defbindings("WFrame", {

    -The so-called ''winprops'' can be used to change how +The so-called ''winprops'' can be used to change how specific windows are handled and to set up some kludges to deal with badly behaving applications. They are defined by calling the function defwinprop with a table containing the properties to set and the @@ -867,7 +877,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 @@ -877,21 +887,6 @@ usual method of identifying windows, and how to obtain this information.
    -

    - -

    -
    Winprop:
    -
    aspect (table) - -
    -
    Description:
    -
    - The table should contain the entries w and h that - override application-supplied aspect ratio hint. - -
    -
    -

    @@ -900,7 +895,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. @@ -915,7 +910,7 @@ usual method of identifying windows, and how to obtain this information.
    Description:
    -
    +
    Should the window be initially in full screen mode?
    @@ -929,7 +924,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. @@ -944,26 +939,12 @@ usual method of identifying windows, and how to obtain this information.
    Description:
    -
    +
    Ignore extended WM hints _NET_ACTIVE_WINDOW request.
    -

    - -

    -
    Winprop:
    -
    ignore_resizeinc (boolean) - -
    -
    Description:
    -
    - Should application supplied size increments be ignored? - -
    -
    -

    @@ -972,42 +953,13 @@ 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.
    -

    - -

    -
    Winprop:
    -
    max_size (table) - -
    -
    Description:
    -
    - The table should contain the entries w and h that - override application-supplied maximum size hint. - -
    -
    - -

    - -

    -
    Winprop:
    -
    min_size (table) - -
    -
    Description:
    -
    - Similar to max_size but for the minimum size hint. - -
    -
    -

    @@ -1016,7 +968,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 @@ -1035,7 +987,7 @@ usual method of identifying windows, and how to obtain this information.
    Description:
    -
    +
    Discard this winprop after first use.
    @@ -1049,11 +1001,11 @@ usual method of identifying windows, and how to obtain this information.
    Description:
    -
    - Put the window on the statusbar, in the named tray component, - (The default tray component is called simply ``systray'', +
    + 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 - prefixed by ``systray_''. + prefixed by "systray_".
    @@ -1066,7 +1018,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. @@ -1081,7 +1033,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. @@ -1096,33 +1048,17 @@ 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 - transient by the application. "off": The window should be - handled as a normal window even if it is marked as a +
    + "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 + transient by the application. "off": The window should + be handled as a normal window even if it is marked as a transient by the application.
    -

    - -

    -
    Winprop:
    -
    transients_at_top (boolean) - -
    -
    Description:
    -
    - When transients are managed by the client window itself (as it - is the case on tiled workspaces), should the transients be - placed at the top of the window instead of bottom? - -
    -
    -

    @@ -1131,7 +1067,7 @@ usual method of identifying windows, and how to obtain this information.
    Description:
    -
    +
    Should frames be made transparent when this window is selected?
    @@ -1140,17 +1076,47 @@ usual method of identifying windows, and how to obtain this information.

    -

    +

    +3.5.1 Sizehint winprops +

    + +

    +Additionally, the winprops +max_size, +min_size, +aspect, +resizeinc, +and +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 +winprop is a boolean. + +

    +Finally, the boolean +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 +only for floating windows. + +

    + +


    -3.5.1 Classes, roles and instances +3.5.2 Classes, roles and instances

    The identification information in the winprop specification is usually the -class, -role, -instance and +class, +role, +instance and name of the window. The name field is a Lua-style regular expression matched against the window's title and the rest are strings that must @@ -1223,8 +1189,8 @@ the same but different name, the longest match is chosen.

    -

    -3.5.2 Finding window identification +

    +3.5.3 Finding window identification

    @@ -1233,7 +1199,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 @@ -1242,7 +1208,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 @@ -1251,7 +1217,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.4 + HREF="#foot1464">3.4

    Finally, it should be mentioned that too many authors these days ''forget'' to set this vital identification to anything meaningful: @@ -1260,14 +1226,14 @@ windows, for example.

    -

    -3.5.3 Some common examples +

    +3.5.4 Some common examples

    -

    -3.5.3.1 Acrobat Reader +

    +3.5.4.1 Acrobat Reader

    @@ -1284,8 +1250,8 @@ defwinprop{

    -

    -3.5.3.2 Fixing a Mozilla Firebird transient +

    +3.5.4.2 Fixing a Mozilla Firebird transient

    @@ -1313,8 +1279,8 @@ defwinprop{

    -

    -3.5.3.3 Forcing newly created windows in named frames +

    +3.5.4.3 Forcing newly created windows in named frames

    @@ -1351,26 +1317,26 @@ default name formed from the frame's class name and an instance number.



    Footnotes

    -
    ...keysymdef.h...keysymdef.h3.1
    This file can usually be found in the directory /usr/X11R6/include/X11/.
    -
    ... such... such3.2
    Completely useless keys that should be gotten rid of in the author's opinion.
    -
    ... handling.... handling.3.3
    See the wcirculate.lua script in the Ion scripts repository http://iki.fi/tuomov/repos/ion-scripts-3/.
    -
    ... window.... window.3.4
    There's a patch to xprop to fix this, but nothing seems to be happening with respect to including it in @@ -1380,31 +1346,31 @@ XFree86.
    diff --git a/doc/ionconf/node5.html b/doc/ionconf/node5.html index da15f29..de5ae5e 100644 --- a/doc/ionconf/node5.html +++ b/doc/ionconf/node5.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -61,50 +61,50 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -125,7 +125,7 @@ for the default drawing engine.

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

    @@ -177,7 +177,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 @@ -412,7 +412,7 @@ border elements and styles referred to there are explained in Figure

    -

    +
    @@ -488,6 +488,12 @@ indicating a number of pixels. elevated/inlaid/ridge/groove as seen in the above sketch. + + + @@ -693,31 +699,31 @@ style configuration files. diff --git a/doc/ionconf/node6.html b/doc/ionconf/node6.html index 8c985d1..17e8f34 100644 --- a/doc/ionconf/node6.html +++ b/doc/ionconf/node6.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -61,20 +61,20 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -122,7 +122,7 @@ ioncore.get_hook("ioncore_snapshot_hook"):add(

    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 6.8. +the hook reference, section 6.9.

    Note that many of the hooks are called in ''protected mode'' and can not @@ -319,31 +319,31 @@ local settings=table.join(statusd.get_config("foo"), defaults)

    diff --git a/doc/ionconf/node7.html b/doc/ionconf/node7.html index 628a670..9b8b3e3 100644 --- a/doc/ionconf/node7.html +++ b/doc/ionconf/node7.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -61,89 +61,96 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections
    @@ -163,8 +170,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
    -
    - +
    +
    Synopsis:
    @@ -180,8 +187,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    -
    - +
    +
    Synopsis:
    @@ -198,8 +205,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    -
    - +
    +
    Synopsis:
    @@ -215,8 +222,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    -
    - +
    +
    Synopsis:
    @@ -242,8 +249,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -261,8 +268,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -280,8 +287,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -298,8 +305,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -317,8 +324,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -336,8 +343,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -353,8 +360,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -376,8 +383,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -393,8 +400,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -411,8 +418,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -429,8 +436,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -447,8 +454,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -465,8 +472,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -482,8 +489,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -499,8 +506,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -516,8 +523,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -534,8 +541,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -551,8 +558,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -568,8 +575,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -585,8 +592,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -602,8 +609,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -621,25 +628,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - - -
    -
    Synopsis:
    -
    void ioncore.clear_tags() - -
    -
    Description:
    -
    Untag all regions. - -
    -
    - -

    - -

    -
    - +
    +
    Synopsis:
    @@ -657,8 +647,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -674,8 +664,8 @@ The string guard maybe set to pose limits on _sub. Currently

    -
    - +
    +
    Synopsis:
    @@ -728,8 +718,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -752,8 +742,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -772,8 +762,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -789,8 +779,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -808,8 +798,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -825,8 +815,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -842,8 +832,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -859,8 +849,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -880,8 +870,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -901,8 +891,8 @@ Similarly to sed's 's' command, rule may contain characters that are

    -
    - +
    +
    Synopsis:
    @@ -922,8 +912,8 @@ Note that this function is asynchronous; the screen will not

    -
    - +
    +
    Synopsis:
    @@ -943,8 +933,8 @@ Note that this function is asynchronous; the screen will not

    -
    - +
    +
    Synopsis:
    @@ -964,8 +954,8 @@ Note that this function is asynchronous; the screen will not

    -
    - +
    +
    Synopsis:
    @@ -985,8 +975,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1002,8 +992,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1019,8 +1009,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1036,8 +1026,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1054,8 +1044,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1073,8 +1063,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1083,12 +1073,12 @@ Note that this function is asynchronous; the region will not
    Description:
    Find region next from reg in direction dirstr - (up/down/left/right/next/prev/any). The table param may + (up/down/left/right/next/prev/any). The table param may contain the boolean field nowrap, instructing not to wrap around, and the WRegions no_ascend and no_descend, - and functions ascend_filter and descend_filter from - WRegions (to, from), used to decide when to descend - or ascend into another region. (TODO: more detailed explanation.) + and boolean functions ascend_filter and descend_filter + on WRegion pairs (to, from), are used to decide when + to descend or ascend into another region.
    @@ -1096,8 +1086,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1115,8 +1105,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1132,8 +1122,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1152,8 +1142,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1170,8 +1160,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1188,8 +1178,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1205,8 +1195,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1222,8 +1212,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -1292,6 +1282,15 @@ Note that this function is asynchronous; the region will not One of ''udlr'' (up-down, then left-right), ''lrud'' (left-right, then up-down) or ''random''. +
    + + + + + + + +
    Figure 4.1: Sketch of different border styles and elements
    border_sidesA string indicating which sides of the border + to draw: all/tb/lr for all, top and bottom, and + left and right. To control between left/right + and top/bottom, use the pixel options below.
    highlight_pixels Width of the highlight part of the border in pixels.
    mousefocusString: ''disable'' or ''sloppy''.
    unsqueeze(boolean) Auto-unsqueeze transients/menus/queries/etc.
    autoraise(boolean) Autoraise regions in groups on goto.

    @@ -1309,8 +1308,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1326,8 +1325,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1343,8 +1342,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1360,8 +1359,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1377,16 +1376,33 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    + + +
    +
    Synopsis:
    +
    void ioncore.tagged_clear() + +
    +
    Description:
    +
    Untag all regions. + +
    +
    + +

    + +

    +
    +
    Synopsis:
    -
    WRegion ioncore.tagged_first() +
    WRegion ioncore.tagged_first(bool untag)
    Description:
    -
    Returns first tagged object. +
    Returns first tagged object, untagging it as well if untagis set.
    @@ -1394,8 +1410,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1413,8 +1429,28 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    + + +
    +
    Synopsis:
    +
    void ioncore.unsqueeze(WRegion reg, bool override) + +
    +
    Description:
    +
    Try to detach reg if it fits poorly in its + current location. This function does not do anything, + unless override is set or the unsqueeze option + of ioncore.set is set. + +
    +
    + +

    + +

    +
    +
    Synopsis:
    @@ -1430,8 +1466,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1448,8 +1484,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1465,8 +1501,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1485,8 +1521,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1502,8 +1538,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1520,8 +1556,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1540,8 +1576,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1562,8 +1598,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1579,8 +1615,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1598,8 +1634,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1617,8 +1653,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1637,8 +1673,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1654,8 +1690,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1674,8 +1710,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1692,8 +1728,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1713,19 +1749,23 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    -
    ioncore.menuentry(name, cmd, guard) +
    ioncore.menuentry(name, cmd, guard_or_opts)
    Description:
    Use this function to define normal menu entries. The string name - is the string shown in the visual representation of menu, and the - parameter cmd and guard are similar to those of - ioncore.defbindings. + is the string shown in the visual representation of menu. The + parameter cmd and guard_or_opts (when string) are similar + to those of ioncore.defbindings. If guard_or_opts is + a table, it may contains the guard field, and the priority + field, for controlling positioning of entries in context menus. + (The default priority is 1 for most entries, and -1 for auto-generated + submenus.)
    @@ -1733,8 +1773,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1751,8 +1791,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1768,8 +1808,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1788,8 +1828,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1808,6 +1848,26 @@ When a keyboard resize function is called, and at most kbresize_t_max
    +

    + +

    +
    + + +
    +
    Synopsis:
    +
    ioncore.tagged_attach(reg, param) + +
    +
    Description:
    +
    Attach tagged regions to reg. The method of attach + depends on the types of attached regions and whether reg + implements attach_framed and attach. If param + is not set, the default of {switchto=true} is used. + +
    +
    +

    @@ -1817,8 +1877,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1837,8 +1897,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1855,8 +1915,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1873,8 +1933,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1890,8 +1950,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1913,8 +1973,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1930,8 +1990,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1947,8 +2007,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1964,8 +2024,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1981,8 +2041,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -1999,8 +2059,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -2018,8 +2078,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -2035,8 +2095,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -2054,8 +2114,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -2079,8 +2139,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -2098,8 +2158,8 @@ When a keyboard resize function is called, and at most kbresize_t_max

    -
    - +
    +
    Synopsis:
    @@ -2145,8 +2205,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2162,8 +2222,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2179,8 +2239,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2199,8 +2259,26 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    + + +
    +
    Synopsis:
    +
    bool WGroup.set_bottom(WGroup ws, WRegion reg) + +
    +
    Description:
    +
    Sets the 'bottom' of ws. The region reg must already + be managed by ws, unless nil. + +
    +
    + +

    + +

    +
    +
    Synopsis:
    @@ -2230,8 +2308,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2269,12 +2347,12 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    -
    void WInfoWin.set_text(WInfoWin p, string str) +
    void WInfoWin.set_text(WInfoWin p, string str, integer maxw)
    Description:
    @@ -2292,8 +2370,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2311,8 +2389,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2357,8 +2435,7 @@ In addition parameters to the region to be created are passed in this This option overrides switchto. sizepolicy -(integer) Size policy. - (TODO: document them somewhere.) +(integer) Size policy. geom (table) Geometry specification. @@ -2375,25 +2452,8 @@ In addition parameters to the region to be created are passed in this

    -
    - - -
    -
    Synopsis:
    -
    void WMPlex.attach_tagged(WMPlex mplex) - -
    -
    Description:
    -
    Attach all tagged regions to mplex. - -
    -
    - -

    - -

    -
    - +
    +
    Synopsis:
    @@ -2409,8 +2469,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2418,9 +2478,9 @@ In addition parameters to the region to be created are passed in this
    Description:
    -
    Get index of reg within the multiplexer on list 1. The first region - managed by mplex has index zero. If reg is not managed by - mplex, -1 is returned. +
    Get index of reg on the mutually exclusive list of mplex. + The indices begin from zero.. If reg is not on the list, + -1 is returned.
    @@ -2428,8 +2488,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2446,8 +2506,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2463,8 +2523,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2480,8 +2540,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2500,8 +2560,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2517,8 +2577,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2535,8 +2595,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2555,8 +2615,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2573,8 +2633,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2591,9 +2651,9 @@ In addition parameters to the region to be created are passed in this

    -

    -
    - +
    +
    +
    Synopsis:
    @@ -2601,8 +2661,8 @@ In addition parameters to the region to be created are passed in this
    Description:
    -
    Set index of reg within the multiplexer to index within - the mutually exclusive list. Special values for index are: +
    Set index of reg to index within the mutually exclusive + list of mplex. Special values for index are: @@ -2618,8 +2678,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2658,8 +2718,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2676,8 +2736,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2693,8 +2753,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2717,8 +2777,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2735,8 +2795,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2753,8 +2813,25 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    + + +
    +
    Synopsis:
    +
    table WMoveresMode.geom(WMoveresMode mode) + +
    +
    Description:
    +
    Returns current geometry. + +
    +
    + +

    + +

    +
    +
    Synopsis:
    @@ -2786,8 +2863,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2803,6 +2880,24 @@ In addition parameters to the region to be created are passed in this
    +

    + +

    +
    + + +
    +
    Synopsis:
    +
    table WMoveresMode.rqgeom(WMoveresMode mode, table g) + +
    +
    Description:
    +
    Request exact geometry in move/resize mode. For details on parameters, + see WRegion.rqgeom. + +
    +
    +

    @@ -2812,8 +2907,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2834,8 +2929,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2852,8 +2947,8 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    +
    Synopsis:
    @@ -2870,8 +2965,26 @@ In addition parameters to the region to be created are passed in this

    -
    - +
    + + +
    +
    Synopsis:
    +
    table WRegion.get_configuration(WRegion reg, bool clientwins) + +
    +
    Description:
    +
    Get configuration tree. If clientwins is unset, client windows + are filtered out. + +
    +
    + +

    + +

    +
    +
    Synopsis:
    @@ -2892,8 +3005,26 @@ Note that this function is asynchronous; the region will not

    -
    - +
    + + +
    +
    Synopsis:
    +
    WRegion WRegion.groupleader_of(WRegion reg) + +
    +
    Description:
    +
    Returns the group of reg, if reg is its bottom, + and reg itself otherwise. + +
    +
    + +

    + +

    +
    +
    Synopsis:
    @@ -2909,8 +3040,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -2926,8 +3057,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -2943,8 +3074,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -2960,8 +3091,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -2977,8 +3108,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -2994,8 +3125,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3011,8 +3142,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3028,12 +3159,12 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    -
    bool WRegion.rqclose(WRegion reg, bool relocate) +
    void WRegion.rqclose(WRegion reg, bool relocate)
    Description:
    @@ -3041,12 +3172,11 @@ Note that this function is asynchronous; the region will not depends on whether the particular type of region in question has implemented the feature and, in case of client windows, whether the client supports the WM_DELETE protocol (see also - WClientWin.kill). If the operation is likely to succeed, - true is returned, otherwise false. In most cases the - region will not have been actually destroyed when this function returns. - If relocate is not set, and reg manages other regions, it - will not be closed. Otherwise the managed regions will be attempted - to be relocated. + WClientWin.kill). The region will not be destroyed when + this function returns. To find out if and when it is destroyed, + use the "deinit" notification. If relocate is not set, and + reg manages other regions, it will not be closed. Otherwise + the managed regions will be attempted to be relocated.
    @@ -3054,8 +3184,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3066,8 +3196,8 @@ Note that this function is asynchronous; the region will not
    Recursively attempt to close a region or one of the regions managed by it. If sub is set, it will be used as the managed region, otherwise WRegion.current(reg). The object to be closed is - returned or NULL if nothing can be closed. Also see notes for - WRegion.rqclose. + returned, or NULL if nothing can be closed. For further details, see + notes for WRegion.rqclose.
    @@ -3075,8 +3205,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3095,8 +3225,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3113,8 +3243,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3130,8 +3260,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3148,8 +3278,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3168,8 +3298,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3187,8 +3317,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3205,8 +3335,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3230,8 +3360,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3253,8 +3383,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3270,8 +3400,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3296,8 +3426,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3315,8 +3445,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3334,8 +3464,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3357,7 +3487,7 @@ Note that this function is asynchronous; the region will not

    -
    +
    Synopsis:
    @@ -3379,8 +3509,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3396,8 +3526,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3413,8 +3543,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3440,8 +3570,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3463,8 +3593,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3480,8 +3610,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3498,8 +3628,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3515,8 +3645,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3533,8 +3663,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3556,8 +3686,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3573,8 +3703,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3591,8 +3721,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3606,6 +3736,24 @@ Note that this function is asynchronous; the region will not
    +

    + +

    +
    + + +
    +
    Synopsis:
    +
    bool mod_tiling.untile(WTiling tiling) + +
    +
    Description:
    +
    If tiling is managed by some group, float the frames in + the tiling in that group, and dispose of tiling. + +
    +
    +

    @@ -3615,8 +3763,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3632,8 +3780,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3649,8 +3797,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3668,8 +3816,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3691,8 +3839,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3714,8 +3862,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3737,8 +3885,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3755,8 +3903,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3773,8 +3921,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3790,8 +3938,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3814,8 +3962,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3831,8 +3979,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3848,8 +3996,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3868,8 +4016,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3888,8 +4036,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3908,8 +4056,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3926,8 +4074,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3946,8 +4094,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3965,8 +4113,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -3984,8 +4132,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4006,8 +4154,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4023,8 +4171,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4040,17 +4188,17 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    -
    bool WTiling.unsplit_at(WTiling ws, WFrame frame) +
    void WTiling.unsplit_at(WTiling ws, WRegion reg)
    Description:
    -
    Try to relocate regions managed by frame to another frame - and, if possible, destroy the frame. +
    Try to relocate regions managed by reg to another frame + and, if possible, destroy it.
    @@ -4064,8 +4212,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4081,8 +4229,25 @@ Note that this function is asynchronous; the region will not

    -
    - +
    + + +
    +
    Synopsis:
    +
    mod_query.message(mplex, str) + +
    +
    Description:
    +
    Display a message in mplex. + +
    +
    + +

    + +

    +
    +
    Synopsis:
    @@ -4099,8 +4264,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4116,8 +4281,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4133,8 +4298,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4150,8 +4315,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4171,8 +4336,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4188,25 +4353,8 @@ Note that this function is asynchronous; the region will not

    -
    - - -
    -
    Synopsis:
    -
    WMessage mod_query.message(WMPlex mplex, string p) - -
    -
    Description:
    -
    Display a message in the mplex. - -
    -
    - -

    - -

    -
    - +
    +
    Synopsis:
    @@ -4241,25 +4389,8 @@ Note that this function is asynchronous; the region will not

    -
    - - -
    -
    Synopsis:
    -
    WMessage mod_query.warn(WMPlex mplex, string p) - -
    -
    Description:
    -
    Display an error message box in the multiplexer mplex. - -
    -
    - -

    - -

    -
    - +
    +
    Synopsis:
    @@ -4282,8 +4413,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4309,8 +4440,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4328,8 +4459,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4347,8 +4478,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4368,8 +4499,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4387,8 +4518,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4407,8 +4538,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4426,12 +4557,12 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    -
    mod_query.query_menu(mplex, themenu, prompt) +
    mod_query.query_menu(mplex, sub, themenu, prompt)
    Description:
    @@ -4443,8 +4574,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4461,8 +4592,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4480,8 +4611,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4498,8 +4629,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4517,8 +4648,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4536,8 +4667,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4554,8 +4685,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4575,8 +4706,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4594,8 +4725,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4611,8 +4742,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4625,6 +4756,23 @@ Note that this function is asynchronous; the region will not
    +

    + +

    +
    + + +
    +
    Synopsis:
    +
    mod_query.warn(mplex, str) + +
    +
    Description:
    +
    Display an error message box in the multiplexer mplex. + +
    +
    +

    @@ -4634,8 +4782,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4661,8 +4809,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4678,8 +4826,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4695,8 +4843,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4713,8 +4861,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4730,8 +4878,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4748,8 +4896,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4765,8 +4913,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4788,8 +4936,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4805,8 +4953,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4822,8 +4970,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4839,8 +4987,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4857,8 +5005,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4874,8 +5022,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4891,8 +5039,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4908,8 +5056,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4925,8 +5073,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4944,8 +5092,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4963,8 +5111,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4980,8 +5128,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -4997,8 +5145,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -5014,8 +5162,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -5031,8 +5179,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -5048,8 +5196,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -5066,8 +5214,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -5085,8 +5233,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -5102,8 +5250,8 @@ Note that this function is asynchronous; the region will not

    -
    - +
    +
    Synopsis:
    @@ -5124,8 +5272,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5142,8 +5290,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5159,8 +5307,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5176,8 +5324,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5193,8 +5341,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5211,8 +5359,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5228,8 +5376,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5251,8 +5399,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5268,8 +5416,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5285,8 +5433,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5308,8 +5456,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5327,8 +5475,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5354,8 +5502,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5371,8 +5519,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5406,8 +5554,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5431,8 +5579,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5448,8 +5596,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5466,8 +5614,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5483,8 +5631,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5500,8 +5648,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5517,8 +5665,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5540,8 +5688,8 @@ Note that this function is asynchronous; the selection will not
    -
    - +
    +
    Synopsis:
    @@ -5563,8 +5711,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5580,8 +5728,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5598,8 +5746,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5615,8 +5763,8 @@ Note that this function is asynchronous; the selection will not

    -
    - +
    +
    Synopsis:
    @@ -5671,8 +5819,8 @@ Any parameters not explicitly set in conftab will be left unchanged.
    -
    - +
    +
    Synopsis:
    @@ -5689,8 +5837,8 @@ Any parameters not explicitly set in conftab will be left unchanged.

    -
    - +
    +
    Synopsis:
    @@ -5707,14 +5855,147 @@ Any parameters not explicitly set in conftab will be left unchanged.

    + +
    +6.7 Functions defined in mod_statusbar +

    + +
    +
    + + +
    +
    Synopsis:
    +
    table mod_statusbar.statusbars() + +
    +
    Description:
    +
    Returns a list of all statusbars. + +
    +
    + +

    + +

    +6.7.1 WStatusBar functions +

    + +

    + +

    +
    + + +
    +
    Synopsis:
    +
    table WStatusBar.get_template_table(WStatusBar sb) + +
    +
    Description:
    +
    Get statusbar template as table. + +
    +
    + +

    + +

    +
    + + +
    +
    Synopsis:
    +
    bool WStatusBar.is_systray_extl(WStatusBar sb) + +
    +
    Description:
    +
    Is sb used as a systray? + +
    +
    + +

    + +

    +
    + + +
    +
    Synopsis:
    +
    bool WStatusBar.set_systray(WStatusBar sb, string how) + +
    +
    Description:
    +
    Enable or disable use of sb as systray. + The parameter how can be one of (set/unset/toggle). + Resulting state is returned. + +
    +
    + +

    + +

    +
    + + +
    +
    Synopsis:
    +
    void WStatusBar.set_template(WStatusBar sb, string tmpl) + +
    +
    Description:
    +
    Set statusbar template. + +
    +
    + +

    + +

    +
    + + +
    +
    Synopsis:
    +
    void WStatusBar.set_template_table(WStatusBar sb, table t) + +
    +
    Description:
    +
    Set statusbar template as table. + +
    +
    + +

    + +

    +
    + + +
    +
    Synopsis:
    +
    void WStatusBar.update(WStatusBar sb, table t) + +
    +
    Description:
    +
    Set statusbar template. + +
    +
    + +

    + +


    -6.7 Functions defined in de +6.8 Functions defined in de

    -
    - +
    +
    Synopsis:
    @@ -5730,8 +6011,8 @@ Any parameters not explicitly set in conftab will be left unchanged.

    -
    - +
    +
    Synopsis:
    @@ -5747,8 +6028,8 @@ Any parameters not explicitly set in conftab will be left unchanged.

    -
    - +
    +
    Synopsis:
    @@ -5764,8 +6045,8 @@ Any parameters not explicitly set in conftab will be left unchanged.

    -
    - +
    +
    Synopsis:
    @@ -5780,16 +6061,16 @@ Any parameters not explicitly set in conftab will be left unchanged.

    -

    +


    -6.8 Hooks +6.9 Hooks

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

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

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

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

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

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

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

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

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

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

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

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

    -
    +
    Hook name:
    @@ -6219,31 +6500,31 @@ A region is pseudoactive, when a) it is itself not active (does diff --git a/doc/ionconf/node8.html b/doc/ionconf/node8.html index 7b79bc0..555d7bf 100644 --- a/doc/ionconf/node8.html +++ b/doc/ionconf/node8.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds @@ -61,7 +61,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -565,31 +565,31 @@ General Public License instead of this License. diff --git a/doc/ionconf/node9.html b/doc/ionconf/node9.html index 9d55faa..06f6690 100644 --- a/doc/ionconf/node9.html +++ b/doc/ionconf/node9.html @@ -28,31 +28,31 @@ original version by: Nikos Drakos, CBLU, University of Leeds diff --git a/doc/ionnotes.dvi.gz b/doc/ionnotes.dvi.gz index 599aad6..1d53cb6 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 2bbff07..d83c4f9 100644 Binary files a/doc/ionnotes.ps.gz and b/doc/ionnotes.ps.gz differ diff --git a/doc/ionnotes/node2.html b/doc/ionnotes/node2.html index ad3c839..d181c54 100644 --- a/doc/ionnotes/node2.html +++ b/doc/ionnotes/node2.html @@ -354,10 +354,12 @@ Most common manager-managed relations | |--> WClientWin |-->WGroupWSs for workspaces | |-->WTiling - | | |-->possibly a WEdln, WMessage or WMenu | | |-->WFrames - | | |-->WGroupCWs (with contents as above) + | | | |-->WGroupCWs (with contents as above) + | | |-->possibly a WStatusBar or WDock | |-->WFrames for floating content + | |-->possibly a WEdln, WMessage or WMenu + | |-->possibly a WStatusBar or WDock (if no tiling) |-->WFrames for sticky stuff, such as the scratchpad
    Last.
    diff --git a/doc/ionnotes/node9.html b/doc/ionnotes/node9.html index 7823010..fd8126b 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-02-03 +The translation was initiated by tuomov on 2007-03-18


    diff --git a/doc/objects.tex b/doc/objects.tex index 80321fa..5a5b04f 100644 --- a/doc/objects.tex +++ b/doc/objects.tex @@ -203,10 +203,12 @@ but all have a parent--a screen if not anything else. | |--> WClientWin |-->WGroupWSs for workspaces | |-->WTiling - | | |-->possibly a WEdln, WMessage or WMenu | | |-->WFrames - | | |-->WGroupCWs (with contents as above) + | | | |-->WGroupCWs (with contents as above) + | | |-->possibly a WStatusBar or WDock | |-->WFrames for floating content + | |-->possibly a WEdln, WMessage or WMenu + | |-->possibly a WStatusBar or WDock (if no tiling) |-->WFrames for sticky stuff, such as the scratchpad \end{verbatim} \caption{Most common manager--managed relations} diff --git a/etc/Makefile b/etc/Makefile index 2c5b191..6a940a1 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -8,13 +8,16 @@ include $(TOPDIR)/build/system-inc.mk ###################################### -ETC = cfg_ion.lua cfg_ioncore.lua cfg_kludges.lua cfg_modules.lua \ +ETC = cfg_ion.lua cfg_ioncore.lua cfg_kludges.lua cfg_defaults.lua \ cfg_tiling.lua cfg_query.lua cfg_menu.lua \ cfg_statusbar.lua cfg_dock.lua cfg_layouts.lua \ look_brownsteel.lua look_clean.lua look_dusky.lua \ look_greyviolet.lua look_ios.lua look_cleanviolet.lua \ - look_simpleblue.lua look_cleanios.lua \ - lookcommon_clean.lua lookcommon_emboss.lua + look_simpleblue.lua look_cleanios.lua look_newviolet.lua \ + lookcommon_clean.lua lookcommon_clean_stdisp.lua \ + lookcommon_clean_tab.lua lookcommon_clean_frame.lua \ + lookcommon_emboss.lua lookcommon_emboss_stdisp.lua \ + lookcommon_emboss_tab.lua lookcommon_emboss_frame.lua ###################################### @@ -24,4 +27,4 @@ include $(TOPDIR)/build/rules.mk _install: etc_install rm -f $(ETCDIR)/look.lua - ln -s look_cleanviolet.lua $(ETCDIR)/look.lua + ln -s look_newviolet.lua $(ETCDIR)/look.lua diff --git a/etc/cfg_defaults.lua b/etc/cfg_defaults.lua new file mode 100644 index 0000000..096ab9b --- /dev/null +++ b/etc/cfg_defaults.lua @@ -0,0 +1,17 @@ +-- +-- Ion default settings +-- + +dopath("cfg_ioncore") +dopath("cfg_kludges") +dopath("cfg_layouts") + +dopath("mod_query") +dopath("mod_menu") +dopath("mod_tiling") +dopath("mod_statusbar") +--dopath("mod_dock") +dopath("mod_sp") + +-- Deprecated. +dopath("cfg_user", true) diff --git a/etc/cfg_ion.lua b/etc/cfg_ion.lua index 339a026..d1255e5 100644 --- a/etc/cfg_ion.lua +++ b/etc/cfg_ion.lua @@ -34,17 +34,23 @@ ioncore.set{ --warp=true, } --- cfg_ioncore contains configuration of the Ion 'core' -dopath("cfg_ioncore") + +-- Load default settings. The file cfg_defaults loads all the files +-- commented out below, except mod_dock. If you do not want to load +-- something, comment out this line, and uncomment the lines corresponding +-- the the modules or configuration files that you want, below. +dopath("cfg_defaults") + +-- Load configuration of the Ion 'core' +--dopath("cfg_ioncore") -- Load some kludges to make apps behave better. -dopath("cfg_kludges") +--dopath("cfg_kludges") --- Load some modules. Disable the loading of cfg_modules by commenting out --- the corresponding line with -- if you don't want the whole default set --- (everything except mod_dock). Then uncomment the lines for the modules --- you want. -dopath("cfg_modules") +-- Define some layouts. +--dopath("cfg_layouts") + +-- Load some modules. --dopath("mod_query") --dopath("mod_menu") --dopath("mod_tiling") @@ -52,9 +58,3 @@ dopath("cfg_modules") --dopath("mod_dock") --dopath("mod_sp") --- Define some default layouts. This is also done by cfg_modules --- if loaded. ---dopath("cfg_layouts", true) - --- Deprecated. -dopath("cfg_user", true) diff --git a/etc/cfg_ioncore.lua b/etc/cfg_ioncore.lua index b10b46c..4cfe2a3 100644 --- a/etc/cfg_ioncore.lua +++ b/etc/cfg_ioncore.lua @@ -65,7 +65,7 @@ defbindings("WScreen", { kpress(META.."F9", "ioncore.create_ws(_)"), bdoc("Display the main menu."), - kpress(ALTMETA.."F12", "mod_query.query_menu(_, 'mainmenu', 'Main menu:')"), + kpress(ALTMETA.."F12", "mod_query.query_menu(_, _sub, 'mainmenu', 'Main menu:')"), --kpress(ALTMETA.."F12", "mod_menu.menu(_, _sub, 'mainmenu', {big=true})"), mpress("Button3", "mod_menu.pmenu(_, _sub, 'mainmenu')"), @@ -178,13 +178,9 @@ defbindings("WMPlex.toplevel", { bdoc("Query for a client window to go to."), kpress(META.."G", "mod_query.query_gotoclient(_)"), - bdoc("Query for a client window to attach."), - kpress(META.."A", "mod_query.query_attachclient(_)"), - bdoc("Display context menu."), - --kpress(META.."M", "mod_menu.menu(_, _sub, 'ctxmenu')"), - kpress(META.."M", "mod_query.query_menu(_, 'ctxmenu', 'Context menu:')"), - + --kpress(META.."M", "mod_menu.menu(_, _chld, 'ctxmenu')"), + kpress(META.."M", "mod_query.query_menu(_, _chld, 'ctxmenu', 'Context menu:')"), }) @@ -201,7 +197,7 @@ defbindings("WFrame", { }), bdoc("Display context menu."), - mpress("Button3", "mod_menu.pmenu(_, _sub, 'ctxmenu')"), + mpress("Button3", "mod_menu.pmenu(_, _chld, 'ctxmenu')"), bdoc("Begin move/resize mode."), kpress(META.."R", "WFrame.begin_kbresize(_)"), @@ -229,6 +225,9 @@ defbindings("WFrame.toplevel", { bdoc("Tag current object within the frame."), kpress(META.."T", "WRegion.set_tagged(_sub, 'toggle')", "_sub:non-nil"), + bdoc("Query for a client window to attach."), + kpress(META.."A", "mod_query.query_attachclient(_)"), + submap(META.."K", { bdoc("Switch to n:th object within the frame."), kpress("1", "WFrame.switch_nth(_, 0)"), @@ -255,7 +254,7 @@ defbindings("WFrame.toplevel", { kpress("V", "WFrame.maximize_vert(_)"), bdoc("Attach tagged objects to this frame."), - kpress("A", "WFrame.attach_tagged(_)"), + kpress("A", "ioncore.tagged_attach(_)"), }), }) @@ -330,7 +329,8 @@ defbindings("WMoveresMode", { -- Main menu defmenu("mainmenu", { - submenu("Programs", "appmenu"), + menuentry("Run...", "mod_query.query_exec(_)"), + menuentry("Terminal", "ioncore.exec_on(_, XTERM or 'xterm')"), menuentry("Lock screen", "ioncore.exec_on(_, 'xlock')"), menuentry("Help", "mod_query.query_man(_)"), menuentry("About Ion", "mod_query.show_about_ion(_)"), @@ -339,19 +339,6 @@ defmenu("mainmenu", { }) --- Application menu -defmenu("appmenu", { - menuentry("XTerm", "ioncore.exec_on(_, 'xterm')"), - menuentry("W3M", "ioncore.exec_on(_, ':w3m -v')"), - menuentry("Rxvt", "ioncore.exec_on(_, 'rxvt')"), - menuentry("Opera", "ioncore.exec_on(_, 'opera')"), - menuentry("Links", "ioncore.exec_on(_, ':links')"), - menuentry("Konqueror", "ioncore.exec_on(_, 'konqueror')"), - menuentry("Dillo", "ioncore.exec_on(_, 'dillo')"), - menuentry("Run...", "mod_query.query_exec(_)"), -}) - - -- Session control menu defmenu("sessionmenu", { menuentry("Save", "ioncore.snapshot()"), @@ -361,18 +348,23 @@ defmenu("sessionmenu", { }) --- Context menu (frame/client window actions) +-- Context menu (frame actions etc.) defctxmenu("WFrame", "Frame", { + -- Note: this propagates the close to any subwindows; it does not + -- destroy the frame itself, unless empty. An entry to destroy tiled + -- frames is configured in cfg_tiling.lua. menuentry("Close", "WRegion.rqclose_propagate(_, _sub)"), - menuentry("Kill", "WClientWin.kill(_sub)", - "_sub:WClientWin"), - menuentry("De/reattach", "ioncore.detach(_sub, 'toggle')", - "_sub:non-nil"), - menuentry("Toggle tag", "WRegion.set_tagged(_sub, 'toggle')", - "_sub:non-nil"), - menuentry("Attach tagged", "WFrame.attach_tagged(_)"), - menuentry("Clear tags", "ioncore.clear_tags()"), - menuentry("Window info", "mod_query.show_tree(_, _sub)"), + -- Low-priority entries + menuentry("Attach tagged", "ioncore.tagged_attach(_)", { priority = 0 }), + menuentry("Clear tags", "ioncore.clear_tags()", { priority = 0 }), + menuentry("Window info", "mod_query.show_tree(_, _sub)", { priority = 0 }), +}) + + +-- Context menu for groups (workspaces, client windows) +defctxmenu("WGroup", "Group", { + menuentry("Toggle tag", "WRegion.set_tagged(_, 'toggle')"), + menuentry("De/reattach", "ioncore.detach(_, 'toggle')"), }) @@ -380,5 +372,11 @@ defctxmenu("WFrame", "Frame", { defctxmenu("WGroupWS", "Workspace", { menuentry("Close", "WRegion.rqclose(_)"), menuentry("Rename", "mod_query.query_renameworkspace(nil, _)"), + menuentry("Attach tagged", "ioncore.tagged_attach(_)"), }) + +-- Context menu for client windows +defctxmenu("WClientWin", "Client window", { + menuentry("Kill", "WClientWin.kill(_)"), +}) diff --git a/etc/cfg_kludges.lua b/etc/cfg_kludges.lua index cd6fa00..974ac08 100644 --- a/etc/cfg_kludges.lua +++ b/etc/cfg_kludges.lua @@ -17,6 +17,13 @@ defwinprop{ transient_mode = "current", } +defwinprop{ + class = "Xpdf", + instance = "openDialog_popup", + ignore_cfgrq = true, +} + + -- You might want to enable these if you really must use XMMS. --[[ defwinprop{ diff --git a/etc/cfg_layouts.lua b/etc/cfg_layouts.lua index 4299c76..41bda19 100644 --- a/etc/cfg_layouts.lua +++ b/etc/cfg_layouts.lua @@ -2,6 +2,11 @@ -- Layouts for Ion -- +-- +-- Helper routines and structures +-- + +-- Tiled frame template for the layouts below local a_frame = { type="WSplitRegion", regparams = { @@ -10,46 +15,61 @@ local a_frame = { } } +-- Helper function for generating splits for layouts +local function mksplit(dir, tl, br, float) + return { + type = (float and "WSplitFloat" or "WSplitSplit"), + dir = dir, + tls = 1, + brs = 1, + tl = tl, + br = br, + } +end -local horizontally_split = { - -- Destroy workspace if the 'bottom' tiling is destroyed last - bottom_last_close = true, - -- Layout - managed = { - { - type = "WTiling", - bottom = true, - -- The default is a single 1:1 horizontal split - split_tree = { - type = "WSplitSplit", - dir = "horizontal", - tls = 1, - brs = 1, - tl = a_frame, - br = a_frame +local function mktiling(split_tree) + return { + managed = { + { + type = "WTiling", + bottom = true, -- Make it the bottom of the group + split_tree = split_tree, } - -- For a single frame - --split_tree = nil } } -} +end + +-- +-- The layouts +-- +-- Tiling with single 1:1 horizontal split +local tmp=mktiling(mksplit("horizontal", a_frame, a_frame)) +ioncore.deflayout("hsplit", tmp) +ioncore.deflayout("default", tmp) -local full_tiled = { - -- Destroy workspace if the 'bottom' tiling is destroyed last - bottom_last_close = true, - -- Layout - managed = { - { - type = "WTiling", - bottom = true, - } - } -} +-- Tiling with single 1:1 vertical split +ioncore.deflayout("vsplit", + mktiling(mksplit("vertical", a_frame, a_frame)) +) + +-- Tiling with single 1:1 floating horizontal split +ioncore.deflayout("hfloat", + mktiling(mksplit("horizontal", a_frame, a_frame, true)) +) +-- Tiling with single 1:1 floating vertical split +ioncore.deflayout("vfloat", + mktiling(mksplit("vertical", a_frame, a_frame, true)) +) --- Let the world know about them +-- Tiling with horizontal and then vertical splits +ioncore.deflayout("2x2", + mktiling(mksplit("horizontal", + mksplit("vertical", a_frame, a_frame), + mksplit("vertical", a_frame, a_frame)) + ) +) -ioncore.deflayout("default", horizontally_split) -ioncore.deflayout("hsplit", horizontally_split) -ioncore.deflayout("full", full_tiled) +-- Tiling with single full screen frame +ioncore.deflayout("full", mktiling(a_frame)) diff --git a/etc/cfg_modules.lua b/etc/cfg_modules.lua deleted file mode 100644 index 7128f15..0000000 --- a/etc/cfg_modules.lua +++ /dev/null @@ -1,13 +0,0 @@ --- --- Ion default module set. --- - -dopath("mod_query") -dopath("mod_menu") -dopath("mod_tiling") -dopath("mod_statusbar") ---dopath("mod_dock") -dopath("mod_sp") - --- Load some layouts -dopath("cfg_layouts") diff --git a/etc/cfg_query.lua b/etc/cfg_query.lua index 84f7da6..6abc8a5 100644 --- a/etc/cfg_query.lua +++ b/etc/cfg_query.lua @@ -110,8 +110,12 @@ defbindings("WInput", { mod_query.set{ -- Auto-show completions? autoshowcompl=true, + -- Delay for completion after latest keypress/modification in -- milliseconds autoshowcompl_delay=250, + + -- Case-insensitive completion? (Some queries only.) + caseicompl=true, } --]] diff --git a/etc/cfg_tiling.lua b/etc/cfg_tiling.lua index b07178e..3942f08 100644 --- a/etc/cfg_tiling.lua +++ b/etc/cfg_tiling.lua @@ -48,6 +48,8 @@ defctxmenu("WTiling", "Tiling", { menuentry("Flip", "WTiling.flip_at(_, _sub)"), menuentry("Transpose", "WTiling.transpose_at(_, _sub)"), + menuentry("Untile", "mod_tiling.untile(_)"), + submenu("Float split", { menuentry("At left", "WTiling.set_floating_at(_, _sub, 'toggle', 'left')"), diff --git a/etc/look_cleanios.lua b/etc/look_cleanios.lua index 3c11bc8..8af1548 100644 --- a/etc/look_cleanios.lua +++ b/etc/look_cleanios.lua @@ -62,11 +62,5 @@ de.defstyle("input-edln", { dopath("lookcommon_clean") -de.defstyle("tab-menuentry-big", { - based_on = "tab-menuentry", - font = "-*-helvetica-medium-r-normal-*-17-*-*-*-*-*-*-*", - padding_pixels = 7, -}) - gr.refresh() diff --git a/etc/look_cleanviolet.lua b/etc/look_cleanviolet.lua index 70e8acc..d52efac 100644 --- a/etc/look_cleanviolet.lua +++ b/etc/look_cleanviolet.lua @@ -76,12 +76,5 @@ de.defstyle("input", { dopath("lookcommon_clean") -de.defstyle("tab-menuentry-big", { - based_on = "tab-menuentry", - font = "-*-helvetica-medium-r-normal-*-17-*-*-*-*-*-*-*", - padding_pixels = 7, -}) - - -- Refresh objects' brushes. gr.refresh() diff --git a/etc/look_newviolet.lua b/etc/look_newviolet.lua new file mode 100644 index 0000000..76e2d5a --- /dev/null +++ b/etc/look_newviolet.lua @@ -0,0 +1,113 @@ +-- +-- look_newviolet for Ion's default drawing engine. +-- Based on look_cleanviolet +-- + +if not gr.select_engine("de") then + return +end + +de.reset() + +de.defstyle("*", { + highlight_colour = "#e7e7ff", + shadow_colour = "#e7e7ff", + background_colour = "#b8b8c8", + foreground_colour = "#000000", + + shadow_pixels = 1, + highlight_pixels = 2, + padding_pixels = 1, + spacing = 1, + border_style = "elevated", + border_sides = "tb", + + font = "-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*", + text_align = "center", +}) + + +de.defstyle("tab", { + based_on = "*", + font = "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*", + + de.substyle("active-selected", { + highlight_colour = "#aaaacc", + shadow_colour = "#aaaacc", + background_colour = "#666699", + foreground_colour = "#eeeeee", + }), + + de.substyle("inactive-selected", { + highlight_colour = "#cfcfdf", + shadow_colour = "#cfcfdf", + background_colour = "#9999bb", + foreground_colour = "#000000", + }), +}) + + +de.defstyle("input", { + based_on = "*", + text_align = "left", + highlight_colour = "#eeeeff", + shadow_colour = "#eeeeff", + + de.substyle("*-selection", { + background_colour = "#666699", + foreground_colour = "#000000", + }), + + de.substyle("*-cursor", { + background_colour = "#000000", + foreground_colour = "#b8b8c8", + }), +}) + + +de.defstyle("input-menu", { + based_on = "input", + highlight_pixels = 0, + shadow_pixels = 0, + padding_pixels = 0, +}) + + +de.defstyle("frame", { + based_on = "*", + background_colour = "#000000", + transparent_background = false, + shadow_pixels = 1, + highlight_pixels = 1, + padding_pixels = 0, + border_sides = "all", + de.substyle("quasiactive", { + -- Something detached from the frame is active + padding_colour = "#901010", + }), +}) + +de.defstyle("frame-tiled", { + based_on = "frame", + shadow_pixels = 0, + highlight_pixels = 0, + padding_pixels = 1, +}) + +de.defstyle("frame-tiled-alt", { + based_on = "frame-tiled", + bar = "none", +}) + +de.defstyle("frame-floating", { + based_on = "frame", + bar = "shaped", + padding_pixels = 0, +}) + + +dopath("lookcommon_clean_stdisp") +dopath("lookcommon_clean_tab") + +-- Refresh objects' brushes. +gr.refresh() diff --git a/etc/look_simpleblue.lua b/etc/look_simpleblue.lua index 2c37852..1bce224 100644 --- a/etc/look_simpleblue.lua +++ b/etc/look_simpleblue.lua @@ -65,27 +65,6 @@ de.defstyle("tab", { text_align = "center", }) -de.defstyle("tab-frame", { - based_on = "tab", - de.substyle("*-*-*-*-activity", { - shadow_colour = "#907070", - highlight_colour = "#907070", - background_colour = "#990000", - foreground_colour = "#eeeeee", - }), -}) - -de.defstyle("tab-menuentry", { - based_on = "tab", - text_align = "left", -}) - -de.defstyle("tab-menuentry-big", { - based_on = "tab-menuentry", - font = "-*-helvetica-medium-r-normal-*-17-*-*-*-*-*-*-*", - padding_pixels = 7, -}) - de.defstyle("input", { based_on = "*", shadow_colour = "black", diff --git a/etc/lookcommon_clean.lua b/etc/lookcommon_clean.lua index de0efa2..43399d9 100644 --- a/etc/lookcommon_clean.lua +++ b/etc/lookcommon_clean.lua @@ -1,101 +1,5 @@ --- Settings common to some styles. +-- Settings common to the "clean" styles. -de.defstyle("stdisp", { - based_on = "*", - shadow_pixels = 0, - highlight_pixels = 0, - text_align = "left", - background_colour = "#000000", - foreground_colour = "grey", - font="-misc-fixed-medium-r-*-*-13-*-*-*-*-60-*-*", - - de.substyle("important", { - foreground_colour = "green", - }), - - de.substyle("critical", { - foreground_colour = "red", - }), -}) - -de.defstyle("actnotify", { - based_on = "*", - shadow_colour = "#c04040", - highlight_colour = "#c04040", - background_colour = "#901010", - foreground_colour = "#eeeeee", -}) - -de.defstyle("tab-frame", { - based_on = "tab", - -- TODO: some kind of amend option. It should not be necessary to - -- duplicate this definition for both tab-frame and tab-menuentry, - -- or for each style, nor use more complex hacks to communicate - -- this stuff otherwise. - de.substyle("*-*-*-unselected-activity", { - shadow_colour = "#c04040", - highlight_colour = "#c04040", - background_colour = "#901010", - foreground_colour = "#eeeeee", - }), - - de.substyle("*-*-*-selected-activity", { - shadow_colour = "#c04040", - highlight_colour = "#c04040", - background_colour = "#b03030", - foreground_colour = "#ffffff", - }), -}) - -de.defstyle("tab-frame-tiled", { - based_on = "tab-frame", - spacing = 1, -}) - -de.defstyle("tab-menuentry", { - based_on = "tab", - text_align = "left", - - de.substyle("*-*-*-unselected-activity", { - shadow_colour = "#c04040", - highlight_colour = "#c04040", - background_colour = "#901010", - foreground_colour = "#eeeeee", - }), - - de.substyle("*-*-*-selected-activity", { - shadow_colour = "#c04040", - highlight_colour = "#c04040", - background_colour = "#b03030", - foreground_colour = "#ffffff", - }), -}) - -de.defstyle("frame", { - based_on = "*", - background_colour = "#000000", - transparent_background = false, - de.substyle("quasiactive", { - -- Something detached from the frame is active - padding_colour = "#901010", - }), -}) - -de.defstyle("frame-tiled", { - based_on = "frame", - shadow_pixels = 0, - highlight_pixels = 0, - padding_pixels = 1, - spacing = 1, -}) - -de.defstyle("frame-tiled-alt", { - based_on = "frame-tiled", - bar = "none", -}) - -de.defstyle("frame-floating", { - based_on = "frame", - bar = "shaped", - padding_pixels = 0, -}) +dopath("lookcommon_clean_stdisp") +dopath("lookcommon_clean_tab") +dopath("lookcommon_clean_frame") diff --git a/etc/lookcommon_clean_frame.lua b/etc/lookcommon_clean_frame.lua new file mode 100644 index 0000000..b118558 --- /dev/null +++ b/etc/lookcommon_clean_frame.lua @@ -0,0 +1,30 @@ +-- Common frame settings for the "clean" styles + +de.defstyle("frame", { + based_on = "*", + background_colour = "#000000", + transparent_background = false, + de.substyle("quasiactive", { + -- Something detached from the frame is active + padding_colour = "#901010", + }), +}) + +de.defstyle("frame-tiled", { + based_on = "frame", + shadow_pixels = 0, + highlight_pixels = 0, + padding_pixels = 1, + spacing = 1, +}) + +de.defstyle("frame-tiled-alt", { + based_on = "frame-tiled", + bar = "none", +}) + +de.defstyle("frame-floating", { + based_on = "frame", + bar = "shaped", + padding_pixels = 0, +}) diff --git a/etc/lookcommon_clean_stdisp.lua b/etc/lookcommon_clean_stdisp.lua new file mode 100644 index 0000000..73abd0d --- /dev/null +++ b/etc/lookcommon_clean_stdisp.lua @@ -0,0 +1,19 @@ +-- Common stdisp configuration for the "clean styles" + +de.defstyle("stdisp", { + based_on = "*", + shadow_pixels = 0, + highlight_pixels = 0, + text_align = "left", + background_colour = "#000000", + foreground_colour = "grey", + font="-misc-fixed-medium-r-*-*-13-*-*-*-*-60-*-*", + + de.substyle("important", { + foreground_colour = "green", + }), + + de.substyle("critical", { + foreground_colour = "red", + }), +}) diff --git a/etc/lookcommon_clean_tab.lua b/etc/lookcommon_clean_tab.lua new file mode 100644 index 0000000..e6a619d --- /dev/null +++ b/etc/lookcommon_clean_tab.lua @@ -0,0 +1,60 @@ +-- Common tab configuration (mostly activity stuff) for the "clean styles" + +de.defstyle("actnotify", { + based_on = "*", + shadow_colour = "#c04040", + highlight_colour = "#c04040", + background_colour = "#901010", + foreground_colour = "#eeeeee", +}) + +de.defstyle("tab-frame", { + based_on = "tab", + -- TODO: some kind of amend option. It should not be necessary to + -- duplicate this definition for both tab-frame and tab-menuentry, + -- or for each style, nor use more complex hacks to communicate + -- this stuff otherwise. + de.substyle("*-*-*-unselected-activity", { + shadow_colour = "#c04040", + highlight_colour = "#c04040", + background_colour = "#901010", + foreground_colour = "#eeeeee", + }), + + de.substyle("*-*-*-selected-activity", { + shadow_colour = "#c04040", + highlight_colour = "#c04040", + background_colour = "#b03030", + foreground_colour = "#ffffff", + }), +}) + +de.defstyle("tab-frame-tiled", { + based_on = "tab-frame", + spacing = 1, +}) + +de.defstyle("tab-menuentry", { + based_on = "tab", + text_align = "left", + + de.substyle("*-*-*-unselected-activity", { + shadow_colour = "#c04040", + highlight_colour = "#c04040", + background_colour = "#901010", + foreground_colour = "#eeeeee", + }), + + de.substyle("*-*-*-selected-activity", { + shadow_colour = "#c04040", + highlight_colour = "#c04040", + background_colour = "#b03030", + foreground_colour = "#ffffff", + }), +}) + +de.defstyle("tab-menuentry-big", { + based_on = "tab-menuentry", + font = "-*-helvetica-medium-r-normal-*-17-*-*-*-*-*-*-*", + padding_pixels = 7, +}) diff --git a/etc/lookcommon_emboss.lua b/etc/lookcommon_emboss.lua index 1d771c1..b32289a 100644 --- a/etc/lookcommon_emboss.lua +++ b/etc/lookcommon_emboss.lua @@ -1,95 +1,5 @@ --- Settings common to some styles. +-- Settings common to "emboss" styles. -de.defstyle("stdisp", { - based_on = "*", - shadow_pixels = 0, - highlight_pixels = 0, - text_align = "left", - - de.substyle("important", { - foreground_colour = "green", - }), - - de.substyle("critical", { - foreground_colour = "red", - }), -}) - -de.defstyle("actnotify", { - based_on = "*", - shadow_colour = "#600808", - highlight_colour = "#c04040", - background_colour = "#b03030", - foreground_colour = "#ffffff", -}) - -de.defstyle("tab-frame", { - based_on = "tab", - -- TODO: some kind of amend option. It should not be necessary to - -- duplicate this definition for both tab-frame and tab-menuentry, - -- or for each style, nor use more complex hacks to communicate - -- this stuff otherwise. - de.substyle("*-*-*-unselected-activity", { - shadow_colour = "#600808", - highlight_colour = "#c04040", - background_colour = "#901010", - foreground_colour = "#eeeeee", - }), - - de.substyle("*-*-*-selected-activity", { - shadow_colour = "#600808", - highlight_colour = "#c04040", - background_colour = "#b03030", - foreground_colour = "#ffffff", - }), -}) - -de.defstyle("tab-frame-tiled", { - based_on = "tab-frame", - spacing = 1, -}) - -de.defstyle("frame-tiled", { - based_on = "frame", - border_style = "inlaid", - padding_pixels = 1, - spacing = 1, -}) - -de.defstyle("frame-floating", { - based_on = "frame", - border_style = "ridge", - bar = "shaped" -}) - -de.defstyle("frame-tiled-alt", { - based_on = "frame-tiled", - bar = "none", -}) - -de.defstyle("tab-menuentry", { - based_on = "tab", - text_align = "left", - highlight_pixels = 0, - shadow_pixels = 0, - - de.substyle("*-*-*-unselected-activity", { - shadow_colour = "#600808", - highlight_colour = "#c04040", - background_colour = "#901010", - foreground_colour = "#eeeeee", - }), - - de.substyle("*-*-*-selected-activity", { - shadow_colour = "#600808", - highlight_colour = "#c04040", - background_colour = "#b03030", - foreground_colour = "#ffffff", - }), -}) - -de.defstyle("tab-menuentry-big", { - based_on = "tab-menuentry", - font = "-*-helvetica-medium-r-normal-*-17-*-*-*-*-*-*-*", - padding_pixels = 7, -}) +dopath("lookcommon_emboss_stdisp") +dopath("lookcommon_emboss_tab") +dopath("lookcommon_emboss_frame") diff --git a/etc/lookcommon_emboss_frame.lua b/etc/lookcommon_emboss_frame.lua new file mode 100644 index 0000000..41e1e95 --- /dev/null +++ b/etc/lookcommon_emboss_frame.lua @@ -0,0 +1,17 @@ +de.defstyle("frame-tiled", { + based_on = "frame", + border_style = "inlaid", + padding_pixels = 1, + spacing = 1, +}) + +de.defstyle("frame-floating", { + based_on = "frame", + border_style = "ridge", + bar = "shaped" +}) + +de.defstyle("frame-tiled-alt", { + based_on = "frame-tiled", + bar = "none", +}) diff --git a/etc/lookcommon_emboss_stdisp.lua b/etc/lookcommon_emboss_stdisp.lua new file mode 100644 index 0000000..b6a0ed2 --- /dev/null +++ b/etc/lookcommon_emboss_stdisp.lua @@ -0,0 +1,16 @@ +-- Common stdisp settings for the "emboss" styles + +de.defstyle("stdisp", { + based_on = "*", + shadow_pixels = 0, + highlight_pixels = 0, + text_align = "left", + + de.substyle("important", { + foreground_colour = "green", + }), + + de.substyle("critical", { + foreground_colour = "red", + }), +}) diff --git a/etc/lookcommon_emboss_tab.lua b/etc/lookcommon_emboss_tab.lua new file mode 100644 index 0000000..614ba82 --- /dev/null +++ b/etc/lookcommon_emboss_tab.lua @@ -0,0 +1,62 @@ +-- Common tab settings for the "emboss" styles + +de.defstyle("actnotify", { + based_on = "*", + shadow_colour = "#600808", + highlight_colour = "#c04040", + background_colour = "#b03030", + foreground_colour = "#ffffff", +}) + +de.defstyle("tab-frame", { + based_on = "tab", + -- TODO: some kind of amend option. It should not be necessary to + -- duplicate this definition for both tab-frame and tab-menuentry, + -- or for each style, nor use more complex hacks to communicate + -- this stuff otherwise. + de.substyle("*-*-*-unselected-activity", { + shadow_colour = "#600808", + highlight_colour = "#c04040", + background_colour = "#901010", + foreground_colour = "#eeeeee", + }), + + de.substyle("*-*-*-selected-activity", { + shadow_colour = "#600808", + highlight_colour = "#c04040", + background_colour = "#b03030", + foreground_colour = "#ffffff", + }), +}) + +de.defstyle("tab-frame-tiled", { + based_on = "tab-frame", + spacing = 1, +}) + +de.defstyle("tab-menuentry", { + based_on = "tab", + text_align = "left", + highlight_pixels = 0, + shadow_pixels = 0, + + de.substyle("*-*-*-unselected-activity", { + shadow_colour = "#600808", + highlight_colour = "#c04040", + background_colour = "#901010", + foreground_colour = "#eeeeee", + }), + + de.substyle("*-*-*-selected-activity", { + shadow_colour = "#600808", + highlight_colour = "#c04040", + background_colour = "#b03030", + foreground_colour = "#ffffff", + }), +}) + +de.defstyle("tab-menuentry-big", { + based_on = "tab-menuentry", + font = "-*-helvetica-medium-r-normal-*-17-*-*-*-*-*-*-*", + padding_pixels = 7, +}) diff --git a/exact-version b/exact-version index 43c9187..05c81ed 100644 --- a/exact-version +++ b/exact-version @@ -1,5 +1,5 @@ Context: -[TAG ion-3ds-20070203 -Tuomo Valkonen **20070203145039] +[TAG ion-3ds-20070318 +Tuomo Valkonen **20070318203122] diff --git a/ion/ion.c b/ion/ion.c index 1c7fcf9..7c53d31 100644 --- a/ion/ion.c +++ b/ion/ion.c @@ -129,7 +129,7 @@ void check_new_user_help() static void help() { int i; - printf(TR("Usage: %s [options]\n\n"), prog_execname()); + printf(TR("Usage: %s [options]\n\n"), libtu_progname()); for(i=0; ion_opts[i].descr!=NULL; i++) ion_opts[i].descr=TR(ion_opts[i].descr); optparser_printhelp(OPTP_MIDLONG, ion_opts); @@ -240,7 +240,7 @@ fail: fclose(ef); pid=fork(); if(pid==0){ - ioncore_setup_environ(DefaultScreen(ioncore_g.dpy)); + ioncore_setup_display(DefaultScreen(ioncore_g.dpy)); if(!may_continue) XCloseDisplay(ioncore_g.dpy); else diff --git a/ioncore/Makefile b/ioncore/Makefile index c98fc61..ae41fa5 100644 --- a/ioncore/Makefile +++ b/ioncore/Makefile @@ -24,7 +24,7 @@ SOURCES=binding.c conf-bindings.c cursor.c event.c exec.c focus.c \ pholder.c mplexpholder.c llist.c basicpholder.c sizepolicy.c \ stacking.c group.c grouppholder.c group-cw.c navi.c \ group-ws.c float-placement.c groupedpholder.c framedpholder.c \ - return.c detach.c + return.c detach.c screen-notify.c LUA_SOURCES=\ ioncore_ext.lua ioncore_luaext.lua ioncore_bindings.lua \ diff --git a/ioncore/activity.c b/ioncore/activity.c index 668d10a..60c0519 100644 --- a/ioncore/activity.c +++ b/ioncore/activity.c @@ -149,6 +149,12 @@ WRegion *ioncore_activity_first() } +ObjList *ioncore_activity_list() +{ + return actlist; +} + + /*EXTL_DOC * Go to first region on activity list. */ diff --git a/ioncore/activity.h b/ioncore/activity.h index 5971a6c..a718f7c 100644 --- a/ioncore/activity.h +++ b/ioncore/activity.h @@ -27,5 +27,6 @@ extern void region_clear_mgd_activity(WRegion *mgr); extern bool ioncore_activity_i(ExtlFn fn); extern WRegion *ioncore_activity_first(); extern bool ioncore_goto_activity(); +extern ObjList *ioncore_activity_list(); #endif /* ION_IONCORE_ACTIVITY_H */ diff --git a/ioncore/attach.c b/ioncore/attach.c index 4eeb64e..a1dc7ad 100644 --- a/ioncore/attach.c +++ b/ioncore/attach.c @@ -21,6 +21,7 @@ #include "manage.h" #include "extlconv.h" #include "names.h" +#include "focus.h" /*{{{ Helper */ @@ -51,9 +52,20 @@ static WRegion *doit_reparent(WRegion *mgr, WRegion *reg) { WFitParams fp2; - - if(!region_attach_reparent_check(mgr, reg)) + WRegion *disposeroot; + + if(!region_ancestor_check(mgr, reg)){ + warn(TR("Attempt to make region %s manage its ancestor %s."), + region_name(mgr), region_name(reg)); return NULL; + } + + disposeroot=region_disposeroot(reg); + + if(disposeroot==NULL){ + /* Region may not be reparented */ + return NULL; + } if(fp->mode®ION_FIT_WHATEVER){ /* fp->g is not final; substitute size with current to avoid @@ -75,10 +87,34 @@ static WRegion *doit_reparent(WRegion *mgr, region_detach_manager(reg); if(!cont(mgr, reg, cont_param)){ - #warning "TODO: What?" + WScreen *scr=region_screen_of(reg); + + warn(TR("Unexpected attach error: " + "trying to recover by attaching to screen.")); + + if(scr!=NULL){ + /* Try to attach to screen, to have `reg` attached at least + * somewhere. For better recovery, we could try to get + * a placeholder for `reg` before we detach it, but this + * would add unnecessary overhead in the usual succesfull + * case. (This failure is supposed to be _very_ rare!) + * We intentionally also do not region_postdetach_dispose + * on recovery. + */ + int flags=(region_may_control_focus(reg) + ? MPLEX_ATTACH_SWITCHTO + : 0); + if(mplex_attach_simple(&scr->mplex, reg, flags)!=NULL) + return NULL; + } + + warn(TR("Failed recovery.")); + return NULL; } - + + region_postdetach_dispose(reg, disposeroot); + return reg; } @@ -138,35 +174,35 @@ WRegion *region_attach_helper(WRegion *mgr, /*}}}*/ -/*{{{ Reparent check */ +/*{{{ Reparent check etc. */ -bool region_attach_reparent_check(WRegion *mgr, WRegion *reg) +bool region_ancestor_check(WRegion *dst, WRegion *reg) { WRegion *reg2; - /*if(REGION_MANAGER(reg)==mgr){ - warn(TR("Same manager.")); - return FALSE; - }*/ - /* Check that reg is not a parent or manager of mgr */ - for(reg2=mgr; reg2!=NULL; reg2=REGION_MANAGER(reg2)){ + for(reg2=dst; reg2!=NULL; reg2=REGION_MANAGER(reg2)){ if(reg2==reg) - goto err; + return FALSE; } - for(reg2=REGION_PARENT_REG(mgr); reg2!=NULL; reg2=REGION_PARENT_REG(reg2)){ + for(reg2=REGION_PARENT_REG(dst); reg2!=NULL; reg2=REGION_PARENT_REG(reg2)){ if(reg2==reg) - goto err; + return FALSE; } return TRUE; - -err: - warn(TR("Attempt to make region %s manage its ancestor %s."), - region_name(mgr), region_name(reg)); - return FALSE; +} + + +void region_postdetach_dispose(WRegion *reg, WRegion *disposeroot) +{ + /* disposeroot should be destroyed (as empty and useless) unless it + * still, in fact, is an ancestor of reg. + */ + if(disposeroot!=reg && region_ancestor_check(reg, disposeroot)) + region_dispose(disposeroot); } diff --git a/ioncore/attach.h b/ioncore/attach.h index 8fb94d8..c4a2d96 100644 --- a/ioncore/attach.h +++ b/ioncore/attach.h @@ -54,7 +54,9 @@ extern WRegion *region_attach_helper(WRegion *mgr, WRegionDoAttachFn *fn, void *fn_param, const WRegionAttachData *data); -extern bool region_attach_reparent_check(WRegion *mgr, WRegion *reg); +extern bool region_ancestor_check(WRegion *dst, WRegion *reg); + +extern void region_postdetach_dispose(WRegion *reg, WRegion *disposeroot); #endif /* ION_IONCORE_ATTACH_H */ diff --git a/ioncore/bindmaps.c b/ioncore/bindmaps.c index 9c6bd46..c3be60f 100644 --- a/ioncore/bindmaps.c +++ b/ioncore/bindmaps.c @@ -10,12 +10,14 @@ */ #include +#include #include "common.h" #include "conf-bindings.h" #include "binding.h" -#include #include "framep.h" #include "bindmaps.h" +#include "global.h" +#include "regbind.h" /* @@ -198,3 +200,53 @@ ExtlTab ioncore_do_getbindings() return tab; } + +WBindmap *ioncore_create_cycle_bindmap(uint kcb, uint state, + ExtlFn cycle, ExtlFn bcycle) +{ + WBindmap *bindmap=create_bindmap(); + WBinding b; + + if(bindmap==NULL) + return NULL; + + b.ksb=XKeycodeToKeysym(ioncore_g.dpy, kcb, 0); + b.kcb=kcb; + b.state=state; + b.act=BINDING_KEYPRESS; + b.area=0; + b.wait=FALSE; + b.submap=NULL; + b.func=extl_ref_fn(cycle); + + if(!bindmap_add_binding(bindmap, &b)){ + extl_unref_fn(b.func); + bindmap_destroy(bindmap); + return NULL; + } + + if((b.state&ShiftMask)==0 && bcycle!=extl_fn_none()){ + b.func=extl_ref_fn(bcycle); + b.state|=ShiftMask; + bindmap_add_binding(bindmap, &b); + } + + return bindmap; +} + + +WBindmap *region_add_cycle_bindmap(WRegion *reg, uint kcb, uint state, + ExtlFn cycle, ExtlFn bcycle) +{ + WBindmap *bindmap=ioncore_create_cycle_bindmap(kcb, state, cycle, bcycle); + + if(bindmap!=NULL){ + if(!region_add_bindmap(reg, bindmap)){ + bindmap_destroy(bindmap); + return NULL; + } + } + + return bindmap; +} + diff --git a/ioncore/bindmaps.h b/ioncore/bindmaps.h index 441aabb..f9e0579 100644 --- a/ioncore/bindmaps.h +++ b/ioncore/bindmaps.h @@ -42,5 +42,11 @@ extern WBindmap *ioncore_lookup_bindmap(const char *name); extern bool ioncore_do_defbindings(const char *name, ExtlTab tab); extern ExtlTab ioncore_do_getbindings(); +extern WBindmap *ioncore_create_cycle_bindmap(uint kcb, uint state, + ExtlFn cycle, ExtlFn bcycle); +extern WBindmap *region_add_cycle_bindmap(WRegion *reg, + uint kcb, uint state, + ExtlFn cycle, ExtlFn bcycle); + #endif /* ION_IONCORE_BINDMAP_H */ diff --git a/ioncore/clientwin.c b/ioncore/clientwin.c index d80c37b..4a5b4da 100644 --- a/ioncore/clientwin.c +++ b/ioncore/clientwin.c @@ -43,6 +43,7 @@ #include "bindmaps.h" #include "return.h" #include "conf.h" +#include "group.h" static void set_clientwin_state(WClientWin *cwin, int state); @@ -94,10 +95,30 @@ static WSizePolicy get_sizepolicy_winprop(WClientWin *cwin, } -#define SIZEHINT_PROPS (CLIENTWIN_PROP_MAXSIZE| \ - CLIENTWIN_PROP_MINSIZE| \ - CLIENTWIN_PROP_ASPECT| \ - CLIENTWIN_PROP_IGNORE_RSZINC) +#define SIZEHINT_PROPS (CLIENTWIN_PROP_MAXSIZE| \ + CLIENTWIN_PROP_MINSIZE| \ + CLIENTWIN_PROP_ASPECT| \ + CLIENTWIN_PROP_RSZINC| \ + CLIENTWIN_PROP_I_MAXSIZE| \ + CLIENTWIN_PROP_I_MINSIZE| \ + CLIENTWIN_PROP_I_ASPECT| \ + CLIENTWIN_PROP_I_RSZINC) + + +#define DO_SZH(NAME, FLAG, IFLAG, SZHFLAG, W, H, C) \ + if(extl_table_is_bool_set(tab, "ignore_" NAME)){ \ + cwin->flags|=IFLAG; \ + }else if(extl_table_gets_t(tab, NAME, &tab2)){ \ + if(extl_table_gets_i(tab2, "w", &i1) && \ + extl_table_gets_i(tab2, "h", &i2)){ \ + cwin->size_hints.W=i1; \ + cwin->size_hints.H=i2; \ + C \ + cwin->size_hints.flags|=SZHFLAG; \ + cwin->flags|=FLAG; \ + } \ + extl_unref_table(tab2); \ + } static void clientwin_get_winprops(WClientWin *cwin) @@ -118,44 +139,21 @@ static void clientwin_get_winprops(WClientWin *cwin) if(extl_table_is_bool_set(tab, "acrobatic")) cwin->flags|=CLIENTWIN_PROP_ACROBATIC; - if(extl_table_gets_t(tab, "max_size", &tab2)){ - if(extl_table_gets_i(tab2, "w", &i1) && - extl_table_gets_i(tab2, "h", &i2)){ - cwin->size_hints.max_width=i1; - cwin->size_hints.max_height=i2; - cwin->size_hints.flags|=PMaxSize; - cwin->flags|=CLIENTWIN_PROP_MAXSIZE; - } - extl_unref_table(tab2); - } - - if(extl_table_gets_t(tab, "min_size", &tab2)){ - if(extl_table_gets_i(tab2, "w", &i1) && - extl_table_gets_i(tab2, "h", &i2)){ - cwin->size_hints.min_width=i1; - cwin->size_hints.min_height=i2; - cwin->size_hints.flags|=PMinSize; - cwin->flags|=CLIENTWIN_PROP_MINSIZE; - } - extl_unref_table(tab2); - } - - if(extl_table_gets_t(tab, "aspect", &tab2)){ - if(extl_table_gets_i(tab2, "w", &i1) && - extl_table_gets_i(tab2, "h", &i2)){ - cwin->size_hints.min_aspect.x=i1; - cwin->size_hints.max_aspect.x=i1; - cwin->size_hints.min_aspect.y=i2; - cwin->size_hints.max_aspect.y=i2; - cwin->size_hints.flags|=PAspect; - cwin->flags|=CLIENTWIN_PROP_ASPECT; - } - extl_unref_table(tab2); - } - - if(extl_table_is_bool_set(tab, "ignore_resizeinc")) - cwin->flags|=CLIENTWIN_PROP_IGNORE_RSZINC; - + DO_SZH("max_size", CLIENTWIN_PROP_MAXSIZE, CLIENTWIN_PROP_I_MAXSIZE, + PMaxSize, max_width, max_height, ); + + DO_SZH("min_size", CLIENTWIN_PROP_MINSIZE, CLIENTWIN_PROP_I_MINSIZE, + PMinSize, min_width, min_height, ); + + DO_SZH("resizeinc", CLIENTWIN_PROP_RSZINC, CLIENTWIN_PROP_I_RSZINC, + PResizeInc, width_inc, height_inc, ); + + DO_SZH("aspect", CLIENTWIN_PROP_ASPECT, CLIENTWIN_PROP_I_ASPECT, + PAspect, min_aspect.x, min_aspect.y, + { cwin->size_hints.max_aspect.x=i1; + cwin->size_hints.max_aspect.y=i2; + }); + if(extl_table_is_bool_set(tab, "ignore_cfgrq")) cwin->flags|=CLIENTWIN_PROP_IGNORE_CFGRQ; @@ -175,26 +173,37 @@ void clientwin_get_size_hints(WClientWin *cwin) xwindow_get_sizehints(cwin->win, &(cwin->size_hints)); - if(cwin->flags&CLIENTWIN_PROP_MAXSIZE){ + if(cwin->flags&CLIENTWIN_PROP_I_MAXSIZE){ + cwin->size_hints.flags&=~PMaxSize; + }else if(cwin->flags&CLIENTWIN_PROP_MAXSIZE){ cwin->size_hints.max_width=tmp.max_width; cwin->size_hints.max_height=tmp.max_height; cwin->size_hints.flags|=PMaxSize; } - - if(cwin->flags&CLIENTWIN_PROP_MINSIZE){ + + if(cwin->flags&CLIENTWIN_PROP_I_MINSIZE){ + cwin->size_hints.flags&=~PMinSize; + }else if(cwin->flags&CLIENTWIN_PROP_MINSIZE){ cwin->size_hints.min_width=tmp.min_width; cwin->size_hints.min_height=tmp.min_height; cwin->size_hints.flags|=PMinSize; } - if(cwin->flags&CLIENTWIN_PROP_ASPECT){ + if(cwin->flags&CLIENTWIN_PROP_I_ASPECT){ + cwin->size_hints.flags&=~PAspect; + }else if(cwin->flags&CLIENTWIN_PROP_ASPECT){ cwin->size_hints.min_aspect=tmp.min_aspect; cwin->size_hints.max_aspect=tmp.max_aspect; cwin->size_hints.flags|=PAspect; } - if(cwin->flags&CLIENTWIN_PROP_IGNORE_RSZINC) + if(cwin->flags&CLIENTWIN_PROP_I_RSZINC){ cwin->size_hints.flags&=~PResizeInc; + }else if(cwin->flags&CLIENTWIN_PROP_RSZINC){ + cwin->size_hints.width_inc=tmp.width_inc; + cwin->size_hints.height_inc=tmp.height_inc; + cwin->size_hints.flags|=PResizeInc; + } } @@ -520,7 +529,6 @@ again: param.geom=REGION_GEOM(cwin); param.maprq=maprq; - param.userpos=(cwin->size_hints.flags&USPosition); param.switchto=(init_state!=IconicState && clientwin_get_switchto(cwin)); param.jumpto=extl_table_is_bool_set(cwin->proptab, "jumpto"); param.gravity=(cwin->size_hints.flags&PWinGravity @@ -528,6 +536,9 @@ again: : ForgetGravity); param.tfor=clientwin_get_transient_for(cwin); + if(!extl_table_gets_b(cwin->proptab, "userpos", ¶m.userpos)) + param.userpos=(cwin->size_hints.flags&USPosition); + if(cwin->flags&SIZEHINT_PROPS){ /* If size hints have been messed with, readjust requested geometry * here. If programs themselves give incompatible geometries and @@ -691,7 +702,13 @@ static bool mrsh_u_extl(ExtlFn fn, void *param) static void clientwin_do_unmapped(WClientWin *cwin, Window win) { - region_dispose_((WRegion*)cwin); + cwin->flags|=CLIENTWIN_UNMAP_RQ; + + /* First try a graceful chain-dispose */ + if(!region_rqdispose((WRegion*)cwin)){ + /* But force dispose anyway */ + region_dispose((WRegion*)cwin); + } hook_call(clientwin_unmapped_hook, &win, mrsh_u_c, mrsh_u_extl); } @@ -747,7 +764,7 @@ void clientwin_kill(WClientWin *cwin) } -bool clientwin_rqclose(WClientWin *cwin, bool relocate_ignored) +void clientwin_rqclose(WClientWin *cwin, bool relocate_ignored) { /* Ignore relocate parameter -- client windows can always be * destroyed by the application in any case, so way may just as @@ -757,10 +774,8 @@ bool clientwin_rqclose(WClientWin *cwin, bool relocate_ignored) if(cwin->flags&CLIENTWIN_P_WM_DELETE){ send_clientmsg(cwin->win, ioncore_g.atom_wm_delete, ioncore_get_timestamp()); - return TRUE; }else{ warn(TR("Client does not support the WM_DELETE protocol.")); - return FALSE; } } @@ -1056,26 +1071,31 @@ ExtlTab clientwin_get_ident(WClientWin *cwin) /*{{{ ConfigureRequest */ -void clientwin_handle_configure_request(WClientWin *cwin, - XConfigureRequestEvent *ev) +static bool check_fs_cfgrq(WClientWin *cwin, XConfigureRequestEvent *ev) { - if(ev->value_mask&CWBorderWidth) - cwin->orig_bw=ev->border_width; - - if(cwin->flags&CLIENTWIN_PROP_IGNORE_CFGRQ){ - sendconfig_clientwin(cwin); - return; - } - /* check full screen request */ if((ev->value_mask&(CWWidth|CWHeight))==(CWWidth|CWHeight)){ - bool sw=clientwin_fullscreen_may_switchto(cwin); - if(clientwin_check_fullscreen_request(cwin, ev->width, ev->height, sw)) - return; + WRegion *grp=region_groupleader_of((WRegion*)cwin); + WScreen *scr=clientwin_fullscreen_chkrq(cwin, ev->width, ev->height); + + if(scr!=NULL && REGION_MANAGER(grp)!=(WRegion*)scr){ + bool sw=clientwin_fullscreen_may_switchto(cwin); + + cwin->flags|=CLIENTWIN_FS_RQ; + + if(!region_fullscreen_scr(grp, scr, sw)) + cwin->flags&=~CLIENTWIN_FS_RQ; + } + + return TRUE; } - cwin->flags|=CLIENTWIN_NEED_CFGNTFY; + return FALSE; +} + +static bool check_normal_cfgrq(WClientWin *cwin, XConfigureRequestEvent *ev) +{ if(ev->value_mask&(CWX|CWY|CWWidth|CWHeight)){ WRQGeomParams rq=RQGEOMPARAMS_INIT; int gdx=0, gdy=0; @@ -1130,6 +1150,25 @@ void clientwin_handle_configure_request(WClientWin *cwin, } region_rqgeom((WRegion*)cwin, &rq, NULL); + + return TRUE; + } + + return FALSE; +} + + +void clientwin_handle_configure_request(WClientWin *cwin, + XConfigureRequestEvent *ev) +{ + if(ev->value_mask&CWBorderWidth) + cwin->orig_bw=ev->border_width; + + cwin->flags|=CLIENTWIN_NEED_CFGNTFY; + + if(!(cwin->flags&CLIENTWIN_PROP_IGNORE_CFGRQ)){ + if(!check_fs_cfgrq(cwin, ev)) + check_normal_cfgrq(cwin, ev); } if(cwin->flags&CLIENTWIN_NEED_CFGNTFY){ diff --git a/ioncore/clientwin.h b/ioncore/clientwin.h index f78e826..855bc9e 100644 --- a/ioncore/clientwin.h +++ b/ioncore/clientwin.h @@ -28,15 +28,20 @@ #define CLIENTWIN_P_WM_DELETE 0x00001 #define CLIENTWIN_P_WM_TAKE_FOCUS 0x00002 #define CLIENTWIN_PROP_ACROBATIC 0x00010 -#define CLIENTWIN_PROP_MAXSIZE 0x00020 -#define CLIENTWIN_PROP_ASPECT 0x00040 -#define CLIENTWIN_PROP_TRANSPARENT 0x00080 -#define CLIENTWIN_PROP_IGNORE_RSZINC 0x00100 -#define CLIENTWIN_PROP_MINSIZE 0x00200 -#define CLIENTWIN_PROP_IGNORE_CFGRQ 0x00400 -#define CLIENTWIN_NEED_CFGNTFY 0x01000 +#define CLIENTWIN_PROP_TRANSPARENT 0x00020 +#define CLIENTWIN_PROP_IGNORE_CFGRQ 0x00040 +#define CLIENTWIN_PROP_MINSIZE 0x00100 +#define CLIENTWIN_PROP_MAXSIZE 0x00200 +#define CLIENTWIN_PROP_ASPECT 0x00400 +#define CLIENTWIN_PROP_RSZINC 0x00800 +#define CLIENTWIN_PROP_I_MINSIZE 0x01000 +#define CLIENTWIN_PROP_I_MAXSIZE 0x02000 +#define CLIENTWIN_PROP_I_ASPECT 0x04000 +#define CLIENTWIN_PROP_I_RSZINC 0x08000 #define CLIENTWIN_USE_NET_WM_NAME 0x10000 #define CLIENTWIN_FS_RQ 0x20000 +#define CLIENTWIN_UNMAP_RQ 0x40000 +#define CLIENTWIN_NEED_CFGNTFY 0x80000 DECLCLASS(WClientWin){ @@ -67,7 +72,7 @@ extern void clientwin_get_size_hints(WClientWin *cwin); extern void clientwin_unmapped(WClientWin *cwin); extern void clientwin_destroyed(WClientWin *cwin); extern void clientwin_kill(WClientWin *cwin); -extern bool clientwin_rqclose(WClientWin *cwin, bool relocate_ignored); +extern void clientwin_rqclose(WClientWin *cwin, bool relocate_ignored); extern void clientwin_tfor_changed(WClientWin *cwin); diff --git a/ioncore/conf.c b/ioncore/conf.c index 62c91f1..b8545e2 100644 --- a/ioncore/conf.c +++ b/ioncore/conf.c @@ -76,6 +76,9 @@ static ExtlFn get_layout_fn; * \var{float_placement_method} & (string) How to place floating frames. * One of ''udlr'' (up-down, then left-right), * ''lrud'' (left-right, then up-down) or ''random''. \\ + * \var{mousefocus} & String: ''disable'' or ''sloppy''. \\ + * \var{unsqueeze} & (boolean) Auto-unsqueeze transients/menus/queries/etc. \\ + * \var{autoraise} & (boolean) Autoraise regions in groups on goto. \\ * \end{tabularx} * * When a keyboard resize function is called, and at most \var{kbresize_t_max} @@ -99,6 +102,8 @@ void ioncore_set(ExtlTab tab) extl_table_gets_b(tab, "switchto", &(ioncore_g.switchto_new)); extl_table_gets_b(tab, "screen_notify", &(ioncore_g.screen_notify)); extl_table_gets_b(tab, "framed_transients", &(ioncore_g.framed_transients)); + extl_table_gets_b(tab, "unsqueeze", &(ioncore_g.unsqueeze_enabled)); + extl_table_gets_b(tab, "autoraise", &(ioncore_g.autoraise)); if(extl_table_gets_s(tab, "frame_default_index", &tmp)){ ioncore_g.frame_default_index=stringintmap_value(frame_idxs, @@ -106,6 +111,13 @@ void ioncore_set(ExtlTab tab) ioncore_g.frame_default_index); free(tmp); } + + if(extl_table_gets_s(tab, "mousefocus", &tmp)){ + if(strcmp(tmp, "disabled")==0) + ioncore_g.no_mousefocus=TRUE; + else if(strcmp(tmp, "sloppy")==0) + ioncore_g.no_mousefocus=FALSE; + } if(extl_table_gets_i(tab, "dblclick_delay", &dd)) ioncore_g.dblclick_delay=maxof(0, dd); @@ -146,12 +158,20 @@ ExtlTab ioncore_get() extl_table_sets_b(tab, "switchto", ioncore_g.switchto_new); extl_table_sets_i(tab, "dblclick_delay", ioncore_g.dblclick_delay); extl_table_sets_b(tab, "screen_notify", ioncore_g.screen_notify); + extl_table_sets_b(tab, "framed_transients", ioncore_g.framed_transients); + extl_table_sets_b(tab, "unsqueeze", ioncore_g.unsqueeze_enabled); + extl_table_sets_b(tab, "autoraise", ioncore_g.autoraise); + extl_table_sets_s(tab, "frame_default_index", stringintmap_key(frame_idxs, ioncore_g.frame_default_index, NULL)); + extl_table_sets_s(tab, "mousefocus", (ioncore_g.no_mousefocus + ? "disabled" + : "sloppy")); + ioncore_get_moveres_accel(tab); ioncore_groupws_get(tab); diff --git a/ioncore/detach.c b/ioncore/detach.c index c93ca0c..8493b9a 100644 --- a/ioncore/detach.c +++ b/ioncore/detach.c @@ -14,12 +14,15 @@ #include #include +#include #include #include #include #include #include #include +#include +#include static void get_relative_geom(WRectangle *g, WRegion *reg, WRegion *mgr) @@ -141,7 +144,7 @@ bool ioncore_detach(WRegion *reg, int sp) WGroup *grp; bool set, nset; - reg=region_group_if_bottom(reg); + reg=region_groupleader_of(reg); grp=find_group(check_mplex(reg, &mode)); @@ -192,3 +195,41 @@ bool ioncore_detach_extl(WRegion *reg, const char *how) } +void do_unsqueeze(WRegion *reg) +{ + WSizeHints hints; + + if(REGION_MANAGER_CHK(reg, WScreen)!=NULL) + return; + + region_size_hints(reg, &hints); + + if(!hints.min_set) + return; + + if(hints.min_width<=REGION_GEOM(reg).w && + hints.min_height<=REGION_GEOM(reg).h){ + return; + } + + if(!ioncore_detach(reg, SETPARAM_SET)) + return; + + do_unsqueeze(reg); +} + + +/*EXTL_DOC + * Try to detach \var{reg} if it fits poorly in its + * current location. This function does not do anything, + * unless \var{override} is set or the \var{unsqueeze} option + * of \fnref{ioncore.set} is set. + */ +EXTL_EXPORT +void ioncore_unsqueeze(WRegion *reg, bool override) +{ + if(ioncore_g.unsqueeze_enabled || override) + do_unsqueeze(region_groupleader_of(reg)); +} + + diff --git a/ioncore/detach.h b/ioncore/detach.h index 30b4a4a..237d887 100644 --- a/ioncore/detach.h +++ b/ioncore/detach.h @@ -16,5 +16,7 @@ extern bool ioncore_detach(WRegion *reg, int sp); +extern void ioncore_unsqueeze(WRegion *reg, bool override); + #endif /* ION_IONCORE_DETACH_H */ diff --git a/ioncore/event.c b/ioncore/event.c index 9a3b957..260d6b0 100644 --- a/ioncore/event.c +++ b/ioncore/event.c @@ -172,24 +172,29 @@ static void skip_enterwindow() } -void ioncore_flush() +void ioncore_flushfocus() { - if(ioncore_g.focus_next!=NULL && - ioncore_g.input_mode==IONCORE_INPUTMODE_NORMAL){ - bool warp=ioncore_g.warp_next; - WRegion *next=ioncore_g.focus_next; + WRegion *next; + bool warp; + + if(ioncore_g.input_mode!=IONCORE_INPUTMODE_NORMAL) + return; + + next=ioncore_g.focus_next; + warp=ioncore_g.warp_next; + + if(next==NULL) + return; - ioncore_g.focus_next=NULL; + ioncore_g.focus_next=NULL; - region_do_set_focus(next, warp); + region_do_set_focus(next, warp); - /* Just greedily eating it all away that X has to offer - * seems to be the best we can do with Xlib. - */ + /* Just greedily eating it all away that X has to offer + * seems to be the best we can do with Xlib. + */ + if(warp) skip_enterwindow(); - } - - XFlush(ioncore_g.dpy); } @@ -225,12 +230,22 @@ void ioncore_mainloop() while(1){ check_signals(); mainloop_execute_deferred(); - ioncore_flush(); - - if(QLength(ioncore_g.dpy)>0) - ioncore_x_connection_handler(ioncore_g.conn, NULL); - else - mainloop_select(); + + if(QLength(ioncore_g.dpy)==0){ + XSync(ioncore_g.dpy, False); + + if(QLength(ioncore_g.dpy)==0){ + ioncore_flushfocus(); + XSync(ioncore_g.dpy, False); + + if(QLength(ioncore_g.dpy)==0){ + mainloop_select(); + continue; + } + } + } + + ioncore_x_connection_handler(ioncore_g.conn, NULL); } } diff --git a/ioncore/eventh.c b/ioncore/eventh.c index 5e1e1fe..0a9a57a 100644 --- a/ioncore/eventh.c +++ b/ioncore/eventh.c @@ -63,7 +63,7 @@ bool ioncore_handle_event(XEvent *ev) ioncore_handle_property(&(ev->xproperty)); break; CASE_EVENT(FocusIn) - ioncore_handle_focus_in(&(ev->xfocus), FALSE); + ioncore_handle_focus_in(&(ev->xfocus)); break; CASE_EVENT(FocusOut) ioncore_handle_focus_out(&(ev->xfocus)); @@ -305,14 +305,17 @@ void ioncore_handle_expose(const XExposeEvent *ev) /*{{{ Enter window, focus */ -static void do_handle_enter_window(XEvent *ev) +void ioncore_handle_enter_window(XEvent *ev) { XEnterWindowEvent *eev=&(ev->xcrossing); WRegion *reg=NULL; if(ioncore_g.input_mode!=IONCORE_INPUTMODE_NORMAL) return; - + + if(eev->mode!=NotifyNormal && !ioncore_g.warp_enabled) + return; + reg=XWINDOW_REGION_OF_T(eev->window, WRegion); if(reg==NULL) @@ -323,7 +326,12 @@ static void do_handle_enter_window(XEvent *ev) if(region_skip_focus(reg)) return; - + + if(ioncore_g.focus_next!=NULL && + ioncore_g.focus_next_sourcedetail==NotifyPointer) return; - if(ev->window==region_root_of(reg)){ /* OBJ_IS(reg, WRootWin) */ - D(fprintf(stderr, "scr-in %d %d %d\n", ROOTWIN_OF(reg)->xscr, - ev->mode, ev->detail)); - if((ev->detail==NotifyPointerRoot || ev->detail==NotifyDetailNone) && - pointer_in_root(ev->window) && ioncore_g.focus_next==NULL){ - /* Restore focus */ - if(!skip) - region_set_focus(reg); - return; - } - } - /* Input contexts */ if(OBJ_IS(reg, WWindow)){ wwin=(WWindow*)reg; @@ -409,6 +395,25 @@ void ioncore_handle_focus_in(const XFocusChangeEvent *ev, bool skip) netwm_set_active(reg); region_got_focus(reg); + + if(ioncore_g.focus_next!=NULL && + ioncore_g.focus_next_sourcedetail==NotifyPointerRoot || ev->detail==NotifyDetailNone) + && ev->window==region_root_of(reg) /* OBJ_IS(reg, WRootWin) */){ + /* Restore focus if it was returned to a root window and we don't + * know of a pending focus change. + */ + if(pointer_in_root(ev->window)){ + region_set_focus(reg); + ioncore_g.focus_next_source=IONCORE_FOCUSNEXT_FALLBACK; + } + }else{ + /* Something got the focus, don't use fallback. */ + ioncore_g.focus_next=NULL; + } } @@ -496,7 +501,7 @@ void ioncore_handle_buttonpress(XEvent *ev) ioncore_handle_grabs(ev); break; CASE_EVENT(FocusIn) - ioncore_handle_focus_in(&(ev->xfocus), FALSE); + ioncore_handle_focus_in(&(ev->xfocus)); break; CASE_EVENT(FocusOut) ioncore_handle_focus_out(&(ev->xfocus)); diff --git a/ioncore/eventh.h b/ioncore/eventh.h index 84257a4..3220791 100644 --- a/ioncore/eventh.h +++ b/ioncore/eventh.h @@ -22,7 +22,7 @@ extern void ioncore_handle_enter_window(XEvent *ev); extern void ioncore_handle_unmap_notify(const XUnmapEvent *ev); extern void ioncore_handle_destroy_notify(const XDestroyWindowEvent *ev); extern void ioncore_handle_client_message(const XClientMessageEvent *ev); -extern void ioncore_handle_focus_in(const XFocusChangeEvent *ev, bool skip); +extern void ioncore_handle_focus_in(const XFocusChangeEvent *ev); extern void ioncore_handle_focus_out(const XFocusChangeEvent *ev); extern void ioncore_handle_property(const XPropertyEvent *ev); extern void ioncore_handle_buttonpress(XEvent *ev); diff --git a/ioncore/exec.c b/ioncore/exec.c index 4147172..06838a6 100644 --- a/ioncore/exec.c +++ b/ioncore/exec.c @@ -28,10 +28,12 @@ /*{{{ Exec */ -void ioncore_setup_environ(int xscr) +void ioncore_setup_display(int xscr) { char *tmp, *ptr; char *display; + + /* Set up $DISPLAY */ display=XDisplayName(ioncore_g.display); @@ -54,7 +56,7 @@ void ioncore_setup_environ(int xscr) snprintf(tmp+strlen(tmp), 11, ".%u", (unsigned)xscr); putenv(tmp); - + /* No need to free it, we'll execve soon */ /*free(tmp);*/ @@ -62,25 +64,15 @@ void ioncore_setup_environ(int xscr) } -typedef struct{ - WRootWin *rw; - const char *wd; -} ExecP; - - -static void setup_exec(void *p_) +void ioncore_setup_environ(const WExecP *p) { - ExecP *p=(ExecP*)p_; + /* Set up $DISPLAY */ - close(ioncore_g.conn); + ioncore_setup_display(p->target!=NULL + ? region_rootwin_of(p->target)->xscr + : -1); - ioncore_g.dpy=NULL; - -#ifndef CF_NO_SETPGID - setpgid(0, 0); -#endif - - ioncore_setup_environ(p->rw==NULL ? -1 : p->rw->xscr); + /* Set up working directory */ if(p->wd!=NULL){ if(chdir(p->wd)!=0) @@ -89,13 +81,29 @@ static void setup_exec(void *p_) } +WHook *ioncore_exec_environ_hook=NULL; + + +static void setup_exec(void *execp) +{ + hook_call_p(ioncore_exec_environ_hook, execp, NULL); + +#ifndef CF_NO_SETPGID + setpgid(0, 0); +#endif + + ioncore_g.dpy=NULL; +} + + EXTL_EXPORT -int ioncore_do_exec_rw(WRootWin *rw, const char *cmd, const char *wd, +int ioncore_do_exec_on(WRegion *reg, const char *cmd, const char *wd, ExtlFn errh) { - ExecP p; + WExecP p; - p.rw=rw; + p.target=reg; + p.cmd=cmd; p.wd=wd; return mainloop_popen_bgread(cmd, setup_exec, (void*)&p, @@ -113,7 +121,7 @@ EXTL_SAFE EXTL_EXPORT int ioncore_exec(const char *cmd) { - return ioncore_do_exec_rw(NULL, cmd, NULL, extl_fn_none()); + return ioncore_do_exec_on(NULL, cmd, NULL, extl_fn_none()); } @@ -126,10 +134,11 @@ EXTL_SAFE EXTL_EXPORT int ioncore_popen_bgread(const char *cmd, ExtlFn h, ExtlFn errh) { - ExecP p; + WExecP p; - p.rw=NULL; + p.target=NULL; p.wd=NULL; + p.cmd=cmd; return mainloop_popen_bgread(cmd, setup_exec, (void*)&p, h, errh); } @@ -196,7 +205,7 @@ void ioncore_do_restart() ioncore_deinit(); if(other!=NULL){ if(ioncore_g.display!=NULL) - ioncore_setup_environ(-1); + ioncore_setup_display(-1); mainloop_do_exec(other); warn_err_obj(other); } diff --git a/ioncore/exec.h b/ioncore/exec.h index b7f9bce..b76f01e 100644 --- a/ioncore/exec.h +++ b/ioncore/exec.h @@ -12,9 +12,10 @@ #ifndef ION_IONCORE_EXEC_H #define ION_IONCORE_EXEC_H +#include +#include #include "common.h" #include "rootwin.h" -#include enum{ IONCORE_SM_RESIGN, @@ -24,11 +25,22 @@ enum{ IONCORE_SM_SNAPSHOT }; -extern void ioncore_do_exec(const char *cmd); -extern bool ioncore_exec_on_rootwin(WRootWin *rootwin, const char *cmd); + +INTRSTRUCT(WExecP); + +DECLSTRUCT(WExecP){ + WRegion *target; + const char *cmd; + const char *wd; +}; + + extern bool ioncore_exec(const char *cmd); -extern void ioncore_setup_environ(int scr); +extern int ioncore_do_exec_on(WRegion *reg, const char *cmd, const char *wd, + ExtlFn errh); extern bool ioncore_popen_bgread(const char *cmd, ExtlFn h, ExtlFn errh); +extern void ioncore_setup_environ(const WExecP *p); +extern void ioncore_setup_display(int xscr); extern bool ioncore_set_smhook(void (*fn)(int what)); @@ -44,4 +56,7 @@ extern bool ioncore_do_snapshot(); extern void ioncore_emergency_snapshot(); +/* const WExecP* parameter */ +extern WHook *ioncore_exec_environ_hook; + #endif /* ION_IONCORE_EXEC_H */ diff --git a/ioncore/float-placement.c b/ioncore/float-placement.c index 8d5fb21..3f6a64d 100644 --- a/ioncore/float-placement.c +++ b/ioncore/float-placement.c @@ -34,18 +34,34 @@ static void ggeom(WRegion *reg, WRectangle *geom) } +static bool st_filt(WStacking *st, void *lvl) +{ + uint level=*(uint*)lvl; + + return (st->reg!=NULL && + REGION_IS_MAPPED(st->reg) && + st->level==level); +} + + +#define FOR_ALL_STACKING_NODES(VAR, WS, LVL, TMP) \ + for(stacking_iter_init(&(TMP), group_get_stacking(ws), \ + st_filt, &LVL), \ + VAR=stacking_iter_nodes(&(TMP)); \ + VAR!=NULL; \ + VAR=stacking_iter_nodes(&(TMP))) + + #define IGNORE_ST(ST, WS) ((ST)->reg==NULL || (ST)==(WS)->bottom) -static WRegion* is_occupied(WGroup *ws, const WRectangle *r) + +static WRegion* is_occupied(WGroup *ws, uint level, const WRectangle *r) { - WGroupIterTmp tmp; + WStackingIterTmp tmp; WStacking *st; WRectangle p; - FOR_ALL_NODES_IN_GROUP(ws, st, tmp){ - if(IGNORE_ST(st, ws)) - continue; - + FOR_ALL_STACKING_NODES(st, ws, level, tmp){ ggeom(st->reg, &p); if(r->x>=p.x+p.w) @@ -63,17 +79,14 @@ static WRegion* is_occupied(WGroup *ws, const WRectangle *r) } -static int next_least_x(WGroup *ws, int x) +static int next_least_x(WGroup *ws, uint level, int x) { WRectangle p; int retx=REGION_GEOM(ws).x+REGION_GEOM(ws).w; - WGroupIterTmp tmp; + WStackingIterTmp tmp; WStacking *st; - FOR_ALL_NODES_IN_GROUP(ws, st, tmp){ - if(IGNORE_ST(st, ws)) - continue; - + FOR_ALL_STACKING_NODES(st, ws, level, tmp){ ggeom(st->reg, &p); if(p.x+p.w>x && p.x+p.wreg, &p); if(p.y+p.h>y && p.y+p.hx=r.x; g->y=r.y; return TRUE; }else{ - r.x=next_least_x(ws, r.x); + r.x=next_least_x(ws, level, r.x); r.y=0; } } }else{ while(r.yx=r.x; g->y=r.y; return TRUE; }else{ - r.y=next_lowest_y(ws, r.y); + r.y=next_lowest_y(ws, level, r.y); r.x=0; } } @@ -159,10 +170,10 @@ static bool tiling_placement(WGroup *ws, WRectangle *g) } -void group_calc_placement(WGroup *ws, WRectangle *geom) +void group_calc_placement(WGroup *ws, uint level, WRectangle *geom) { if(ioncore_placement_method!=PLACEMENT_RANDOM){ - if(tiling_placement(ws, geom)) + if(tiling_placement(ws, level, geom)) return; } random_placement(REGION_GEOM(ws), geom); diff --git a/ioncore/float-placement.h b/ioncore/float-placement.h index 2dc062d..760030e 100644 --- a/ioncore/float-placement.h +++ b/ioncore/float-placement.h @@ -22,6 +22,7 @@ typedef enum{ extern WFloatPlacement ioncore_placement_method; -extern void group_calc_placement(WGroup *ws, WRectangle *geom); +extern void group_calc_placement(WGroup *ws, uint level, + WRectangle *geom); #endif /* ION_IONCORE_FLOAT_PLACEMENT_H */ diff --git a/ioncore/focus.c b/ioncore/focus.c index c25ec71..b2341ab 100644 --- a/ioncore/focus.c +++ b/ioncore/focus.c @@ -328,6 +328,9 @@ void region_finalise_focusing(WRegion* reg, Window win, bool warp) if(warp) region_do_warp(reg); + if(REGION_IS_ACTIVE(reg) && ioncore_await_focus()==NULL) + return; + region_set_await_focus(reg); /*xwindow_do_set_focus(win);*/ XSetInputFocus(ioncore_g.dpy, win, RevertToParent, @@ -388,6 +391,7 @@ void region_do_warp(WRegion *reg) void region_maybewarp(WRegion *reg, bool warp) { ioncore_g.focus_next=reg; + ioncore_g.focus_next_source=IONCORE_FOCUSNEXT_OTHER; ioncore_g.warp_next=(warp && ioncore_g.warp_enabled); } @@ -396,7 +400,7 @@ void region_maybewarp_now(WRegion *reg, bool warp) { ioncore_g.focus_next=NULL; /* TODO: what if focus isn't set? Should focus_next be reset then? */ - region_do_set_focus(reg, warp); + region_do_set_focus(reg, warp && ioncore_g.warp_enabled); } @@ -450,34 +454,33 @@ WRegion *ioncore_current() */ void region_pointer_focus_hack(WRegion *reg) { - WRegion *act=ioncore_await_focus(); - const WRectangle *g=®ION_GEOM(reg); - int x, y; + WRegion *act; if(ioncore_g.opmode!=IONCORE_OPMODE_NORMAL) return; - - if(!REGION_IS_ACTIVE(reg) && act==NULL) - act=ioncore_g.focus_current; - if(act==NULL || OBJ_IS_BEING_DESTROYED(act)) + if(ioncore_g.focus_next!=NULL && + ioncore_g.focus_next_source<=IONCORE_FOCUSNEXT_POINTERHACK){ return; - - /* Ok, anything under us should not get focus as we're unmapped: - * Either we don't have the focus, or focus change somewhere else - * is pending. - * - * It might be possible to do the pointer check more efficiently - * by trying to maintain our internal pointer containment state - * by tracking Enter/Leave events... - */ + } - xwindow_pointer_pos(region_xwindow(reg), &x, &y); + act=ioncore_await_focus(); - if(x>=0 && y>=0 && xw && yh){ - D(fprintf(stderr, "Pointer here and shouldn't alter focus!\n")); - region_set_focus(act); + if((REGION_IS_ACTIVE(reg) && act==NULL) || !region_is_fully_mapped(reg)) + return; + + if(act==NULL) + act=ioncore_g.focus_current; + + if(act==NULL || + OBJ_IS_BEING_DESTROYED(act) || + !region_is_fully_mapped(act) || + region_skip_focus(act)){ + return; } + + region_set_focus(act); + ioncore_g.focus_next_source=IONCORE_FOCUSNEXT_POINTERHACK; } diff --git a/ioncore/frame-draw.c b/ioncore/frame-draw.c index 6c43fc6..5be2e6b 100644 --- a/ioncore/frame-draw.c +++ b/ioncore/frame-draw.c @@ -235,7 +235,7 @@ static void frame_shaped_recalc_bar_size(WFrame *frame) if(m>0){ grbrush_get_border_widths(frame->bar_brush, &bdw); - bdtotal=((m-1)*(bdw.tb_ileft+bdw.tb_iright) + bdtotal=((m-1)*(bdw.tb_ileft+bdw.tb_iright+bdw.spacing) +bdw.right+bdw.left); FRAME_MX_FOR_ALL(sub, frame, itmp){ diff --git a/ioncore/frame.c b/ioncore/frame.c index d733c3f..f0e786e 100644 --- a/ioncore/frame.c +++ b/ioncore/frame.c @@ -137,6 +137,7 @@ static void frame_add_mode_bindmaps(WFrame *frame) region_add_bindmap((WRegion*)frame, ioncore_frame_floating_bindmap); }else if(mode==FRAME_MODE_TRANSIENT){ region_add_bindmap((WRegion*)frame, ioncore_frame_transient_bindmap); + region_add_bindmap((WRegion*)frame, ioncore_frame_floating_bindmap); }else{ /* mode==FRAME_MODE_TILED || mode==FRAME_MODE_TILED_ALT || mode==FRAME_MODE_UNKNOWN */ region_add_bindmap((WRegion*)frame, ioncore_mplex_toplevel_bindmap); @@ -456,7 +457,7 @@ void frame_size_hints(WFrame *frame, WSizeHints *hints_ret) if(!USE_MINMAX(frame)){ hints_ret->max_set=0; hints_ret->min_set=0; - hints_ret->base_set=0; + /*hints_ret->base_set=0;*/ hints_ret->aspect_set=0; hints_ret->no_constrain=FALSE; /*hints_ret->no_constrain=TRUE;*/ @@ -832,9 +833,17 @@ bool frame_is_numbers(WFrame *frame) void frame_managed_notify(WFrame *frame, WRegion *sub, WRegionNotify how) { - frame_update_attrs(frame); - frame_recalc_bar(frame); - frame_draw_bar(frame, FALSE); + if(how==ioncore_g.notifies.activated || + how==ioncore_g.notifies.inactivated || + how==ioncore_g.notifies.name || + how==ioncore_g.notifies.activity || + how==ioncore_g.notifies.sub_activity || + how==ioncore_g.notifies.tag){ + + frame_update_attrs(frame); + frame_recalc_bar(frame); + frame_draw_bar(frame, FALSE); + } } @@ -875,27 +884,17 @@ static void frame_managed_changed(WFrame *frame, int mode, bool sw, } -#define EMPTY_AND_SHOULD_BE_DESTROYED(FRAME) \ - (DEST_EMPTY(frame) && FRAME_MCOUNT(FRAME)==0 && \ - !OBJ_IS_BEING_DESTROYED(frame)) - - -static void frame_destroy_empty(WFrame *frame) +WRegion *frame_managed_disposeroot(WFrame *frame, WRegion *reg) { - if(EMPTY_AND_SHOULD_BE_DESTROYED(frame)){ - frame_modify_pholders(frame); - destroy_obj((Obj*)frame); - } -} - - -void frame_managed_remove(WFrame *frame, WRegion *reg) -{ - mplex_managed_remove((WMPlex*)frame, reg); - if(EMPTY_AND_SHOULD_BE_DESTROYED(frame)){ - mainloop_defer_action((Obj*)frame, - (WDeferredAction*)frame_destroy_empty); + if(DEST_EMPTY(frame) && + frame->mplex.mgd!=NULL && + frame->mplex.mgd->reg==reg && + frame->mplex.mgd->next==NULL){ + WRegion *tmp=region_disposeroot((WRegion*)frame); + return (tmp!=NULL ? tmp : reg); } + + return reg; } @@ -960,25 +959,18 @@ WRegion *frame_load(WWindow *par, const WFitParams *fp, ExtlTab tab) int mode=FRAME_MODE_UNKNOWN; WFrame *frame; - if(!extl_table_gets_i(tab, "mode", &mode)){ - #warning "TODO: Remove backwards compatibility hack" - char *style=NULL; - if(extl_table_gets_s(tab, "frame_style", &style)){ - if(strcmp(style, "frame-tiled")==0) - mode=FRAME_MODE_TILED; - else if(strcmp(style, "frame-floating")==0) - mode=FRAME_MODE_FLOATING; - else if(strcmp(style, "frame-transientcontainer")==0) - mode=FRAME_MODE_TRANSIENT; - free(style); - } - } + extl_table_gets_i(tab, "mode", &mode); frame=create_frame(par, fp, mode); if(frame!=NULL) frame_do_load(frame, tab); + if(DEST_EMPTY(frame) && frame->mplex.mgd==NULL){ + destroy_obj((Obj*)frame); + return NULL; + } + return (WRegion*)frame; } @@ -1015,12 +1007,13 @@ static DynFunTab frame_dynfuntab[]={ {(DynFun*)region_fitrep, (DynFun*)frame_fitrep}, + + {(DynFun*)region_managed_disposeroot, + (DynFun*)frame_managed_disposeroot}, {region_managed_rqgeom_absolute, frame_managed_rqgeom_absolute}, - {region_managed_remove, frame_managed_remove}, - {(DynFun*)mplex_default_index, (DynFun*)frame_default_index}, diff --git a/ioncore/frame.h b/ioncore/frame.h index aa4e7a6..7aa5014 100644 --- a/ioncore/frame.h +++ b/ioncore/frame.h @@ -117,7 +117,7 @@ extern int frame_default_index(WFrame *frame); /* Misc */ extern void frame_managed_notify(WFrame *frame, WRegion *sub, WRegionNotify how); -extern void frame_managed_remove(WFrame *frame, WRegion *reg); +extern bool frame_managed_rqdispose(WFrame *frame, WRegion *reg); extern void ioncore_frame_quasiactivation_notify(WRegion *reg, WRegionNotify how); diff --git a/ioncore/fullscreen.c b/ioncore/fullscreen.c index 56ea527..a49d4f5 100644 --- a/ioncore/fullscreen.c +++ b/ioncore/fullscreen.c @@ -20,7 +20,7 @@ #include "fullscreen.h" #include "mwmhints.h" #include "focus.h" -#include "group-cw.h" +#include "group.h" #include "return.h" @@ -125,8 +125,7 @@ bool clientwin_fullscreen_may_switchto(WClientWin *cwin) } -bool clientwin_check_fullscreen_request(WClientWin *cwin, int w, int h, - bool sw) +WScreen *clientwin_fullscreen_chkrq(WClientWin *cwin, int w, int h) { WScreen *scr; WMwmHints *mwm; @@ -135,7 +134,7 @@ bool clientwin_check_fullscreen_request(WClientWin *cwin, int w, int h, mwm=xwindow_get_mwmhints(cwin->win); if(mwm==NULL || !(mwm->flags&MWM_HINTS_DECORATIONS) || mwm->decorations!=0) - return FALSE; + return NULL; FOR_ALL_SCREENS(scr){ if(!region_same_rootwin((WRegion*)scr, (WRegion*)cwin)) @@ -144,17 +143,11 @@ bool clientwin_check_fullscreen_request(WClientWin *cwin, int w, int h, * and doesn't set position, so we also don't check position here, * and instead take the first screen with matching size. */ - if(REGION_GEOM(scr).w==w && REGION_GEOM(scr).h==h){ - cwin->flags|=CLIENTWIN_FS_RQ; - if(!region_fullscreen_scr((WRegion*)cwin, (WScreen*)scr, sw)){ - cwin->flags&=~CLIENTWIN_FS_RQ; - return FALSE; - } - return TRUE; - } + if(REGION_GEOM(scr).w==w && REGION_GEOM(scr).h==h) + return scr; } - return FALSE; + return NULL; } diff --git a/ioncore/fullscreen.h b/ioncore/fullscreen.h index 2822703..2436a98 100644 --- a/ioncore/fullscreen.h +++ b/ioncore/fullscreen.h @@ -19,8 +19,7 @@ #define REGION_IS_FULLSCREEN(REG) OBJ_IS(REGION_PARENT(REG), WScreen) -extern bool clientwin_check_fullscreen_request(WClientWin *cwin, - int w, int h, bool switchto); +extern WScreen *clientwin_fullscreen_chkrq(WClientWin *cwin, int w, int h); extern bool clientwin_fullscreen_may_switchto(WClientWin *cwin); extern bool region_fullscreen_scr(WRegion *reg, WScreen *vp, bool switchto); diff --git a/ioncore/global.h b/ioncore/global.h index b23dce2..7ac7841 100644 --- a/ioncore/global.h +++ b/ioncore/global.h @@ -37,6 +37,14 @@ enum{ IONCORE_OPMODE_DEINIT }; +enum{ + IONCORE_FOCUSNEXT_OTHER, + IONCORE_FOCUSNEXT_POINTERHACK, + IONCORE_FOCUSNEXT_ENTERWINDOW, + IONCORE_FOCUSNEXT_FALLBACK +}; + + INTRSTRUCT(WGlobal); @@ -64,6 +72,7 @@ DECLSTRUCT(WGlobal){ WScreen *screens; WRegion *focus_next; bool warp_next; + int focus_next_source; /* We could have a display WRegion but the screen-link could impose * some problems so these are handled as a special case. @@ -80,8 +89,9 @@ DECLSTRUCT(WGlobal){ bool screen_notify; int frame_default_index; bool framed_transients; - - /*bool save_enabled;*/ + bool no_mousefocus; + bool unsqueeze_enabled; + bool autoraise; bool use_mb; /* use mb routines? */ bool enc_sb; /* 8-bit charset? If unset, use_mb must be set. */ @@ -102,7 +112,9 @@ DECLSTRUCT(WGlobal){ unset_return, pseudoactivated, pseudoinactivated, - deinit; + deinit, + map, + unmap; } notifies; }; diff --git a/ioncore/grab.c b/ioncore/grab.c index d3bbcad..aad2dfd 100644 --- a/ioncore/grab.c +++ b/ioncore/grab.c @@ -2,7 +2,7 @@ * ion/ioncore/grab.c * * Copyright (c) Lukas Schroeder 2002, - * Tuomo Valkonen 2003. + * Tuomo Valkonen 2003-2007. * * Ion is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by @@ -117,7 +117,7 @@ void ioncore_grab_establish(WRegion *reg, GrabHandler *func, current_grab->eventmask=eventmask; current_grab->remove=FALSE; current_grab->cursor=IONCORE_CURSOR_DEFAULT; - current_grab->confine_to=region_root_of(reg); + current_grab->confine_to=None; /*region_root_of(reg);*/ current_grab->sqid=last_sqid++; do_grab_install(current_grab); } diff --git a/ioncore/grab.h b/ioncore/grab.h index 0b09c0a..ecdf256 100644 --- a/ioncore/grab.h +++ b/ioncore/grab.h @@ -2,7 +2,7 @@ * ion/ioncore/grab.h * * Copyright (c) Lukas Schroeder 2002, - * Tuomo Valkonen 2003. + * Tuomo Valkonen 2003-2007. * * Ion is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by diff --git a/ioncore/group-cw.c b/ioncore/group-cw.c index 0084ee2..8181af8 100644 --- a/ioncore/group-cw.c +++ b/ioncore/group-cw.c @@ -180,6 +180,8 @@ void groupcw_managed_notify(WGroupCW *cwg, WRegion *reg, WRegionNotify how) /* Title has changed */ region_notify_change((WRegion*)cwg, how); } + + group_managed_notify(&cwg->grp, reg, how); } @@ -196,8 +198,6 @@ bool groupcw_init(WGroupCW *cwg, WWindow *parent, const WFitParams *fp) if(!group_init(&(cwg->grp), parent, fp)) return FALSE; - cwg->grp.bottom_last_close=TRUE; - region_add_bindmap((WRegion*)cwg, ioncore_groupcw_bindmap); return TRUE; diff --git a/ioncore/group.c b/ioncore/group.c index 538db14..61a3235 100644 --- a/ioncore/group.c +++ b/ioncore/group.c @@ -46,6 +46,7 @@ static void group_place_stdisp(WGroup *ws, WWindow *parent, int pos, WRegion *stdisp); +static void group_remanage_stdisp(WGroup *ws); /*{{{ Stacking list stuff */ @@ -280,19 +281,21 @@ static bool group_managed_prepare_focus(WGroup *ws, WRegion *reg, return mplex_do_prepare_focus(mplex, node, st, flags, res); }else{ - WStacking *stacking; - if(!region_prepare_focus((WRegion*)ws, flags, res)) return FALSE; - stacking=group_get_stacking(ws); st=find_to_focus(ws, st, FALSE); -#warning "TODO: raise in some cases (not enter-window)?" - if(st==NULL) return FALSE; + if(ioncore_g.autoraise && + !(flags®ION_GOTO_ENTERWINDOW) && + st->level>STACKING_LEVEL_BOTTOM){ + WStacking **stackingp=group_get_stackingp(ws); + stacking_restack(stackingp, st, None, NULL, NULL, FALSE); + } + res->reg=st->reg; res->flags=flags; @@ -301,28 +304,12 @@ static bool group_managed_prepare_focus(WGroup *ws, WRegion *reg, } -static bool group_essentially_empty(WGroup *ws) -{ - WGroupIterTmp tmp; - WStacking *st; - - FOR_ALL_NODES_IN_GROUP(ws, st, tmp){ - if(st!=ws->managed_stdisp) - return FALSE; - } - - return TRUE; -} - - void group_managed_remove(WGroup *ws, WRegion *reg) { bool mcf=region_may_control_focus((WRegion*)ws); - bool ds=OBJ_IS_BEING_DESTROYED(ws); WStacking *st, *next_st=NULL; bool was_stdisp=FALSE, was_bottom=FALSE; - bool dest=FALSE; - bool cur=FALSE; + bool was_current=FALSE; st=group_find_stacking(ws, reg); @@ -339,13 +326,11 @@ void group_managed_remove(WGroup *ws, WRegion *reg) if(st==ws->bottom){ ws->bottom=NULL; was_bottom=TRUE; - if(ws->bottom_last_close && group_essentially_empty(ws)) - dest=TRUE; } if(st==ws->current_managed){ - cur=TRUE; ws->current_managed=NULL; + was_current=TRUE; } stacking_unassoc(st); @@ -354,21 +339,15 @@ void group_managed_remove(WGroup *ws, WRegion *reg) region_unset_manager(reg, (WRegion*)ws); - if(!dest && !ds){ + if(!OBJ_IS_BEING_DESTROYED(ws)){ if(was_bottom && !was_stdisp && ws->managed_stdisp==NULL){ /* We should probably be managing any stdisp, that 'bottom' * was managing. */ - WMPlex *mplex=OBJ_CAST(REGION_MANAGER(ws), WMPlex); - - if(mplex!=NULL - && mplex->mx_current!=NULL - && mplex->mx_current->st->reg==(WRegion*)ws){ - mplex_remanage_stdisp(mplex); - } + group_remanage_stdisp(ws); } - if(cur){ + if(was_current){ /* This may still potentially cause problems when focus * change is pending. Perhaps we should use region_await_focus, * if it is pointing to our child (and region_may_control_focus @@ -381,13 +360,11 @@ void group_managed_remove(WGroup *ws, WRegion *reg) ws->current_managed=stf; } } - }else if(dest && !ds){ - region_dispose((WRegion*)ws, mcf); } } -static void group_managed_notify(WGroup *ws, WRegion *reg, WRegionNotify how) +void group_managed_notify(WGroup *ws, WRegion *reg, WRegionNotify how) { if(how==ioncore_g.notifies.activated || how==ioncore_g.notifies.pseudoactivated){ @@ -464,37 +441,100 @@ void group_deinit(WGroup *ws) -bool group_rescue_clientwins(WGroup *ws, WPHolder *ph) +bool group_rescue_clientwins(WGroup *ws, WRescueInfo *info) { WGroupIterTmp tmp; group_iter_init_nostdisp(&tmp, ws); - return region_rescue_some_clientwins((WRegion*)ws, ph, + return region_rescue_some_clientwins((WRegion*)ws, info, (WRegionIterator*)group_iter, &tmp); } -bool group_may_destroy(WGroup *ws) +static bool group_empty_for_bottom_stdisp(WGroup *ws) +{ + WGroupIterTmp tmp; + WStacking *st; + + FOR_ALL_NODES_IN_GROUP(ws, st, tmp){ + if(st!=ws->bottom && st!=ws->managed_stdisp) + return FALSE; + } + + return TRUE; +} + + +static WRegion *group_managed_disposeroot(WGroup *ws, WRegion *reg) +{ + if(group_bottom(ws)==reg){ + if(group_empty_for_bottom_stdisp(ws)) + return region_disposeroot((WRegion*)ws); + } + + return reg; +} + + +/*}}}*/ + + +/*{{{ Bottom */ + + +static void group_do_set_bottom(WGroup *grp, WStacking *st) { - bool ret=group_essentially_empty(ws); - if(!ret) - warn(TR("Workspace not empty - refusing to destroy.")); - return ret; + WStacking *was=grp->bottom; + + grp->bottom=st; + + if(st!=was){ + if(st==NULL || HAS_DYN(st->reg, region_manage_stdisp)) + group_remanage_stdisp(grp); + + } } -static bool group_managed_may_destroy(WGroup *ws, WRegion *reg) +/*EXTL_DOC + * Sets the 'bottom' of \var{ws}. The region \var{reg} must already + * be managed by \var{ws}, unless \code{nil}. + */ +EXTL_EXPORT_MEMBER +bool group_set_bottom(WGroup *ws, WRegion *reg) { + WStacking *st=NULL; + + if(reg!=NULL){ + st=group_find_stacking(ws, reg); + + if(st==NULL) + return FALSE; + } + + group_do_set_bottom(ws, st); + return TRUE; } +/*EXTL_DOC + * Returns the 'bottom' of \var{ws}. + */ +EXTL_SAFE +EXTL_EXPORT_MEMBER +WRegion *group_bottom(WGroup *ws) +{ + return (ws->bottom!=NULL ? ws->bottom->reg : NULL); +} + + /*}}}*/ -/*{{{ attach */ +/*{{{ Attach */ WStacking *group_do_add_managed(WGroup *ws, WRegion *reg, int level, @@ -574,6 +614,16 @@ bool group_do_attach_final(WGroup *ws, int weak; bool sw; + /* Stacking */ + if(param->stack_above!=NULL) + stabove=group_find_stacking(ws, param->stack_above); + + level=(stabove!=NULL + ? stabove->level + : (param->level_set + ? param->level + : STACKING_LEVEL_NORMAL)); + /* Fit */ szplcy=(param->szplcy_set ? param->szplcy @@ -610,7 +660,7 @@ bool group_do_attach_final(WGroup *ws, szplcy==SIZEPOLICY_FREE || szplcy==SIZEPOLICY_FREE_GLUE /* without flags */)){ /* TODO: use 'weak'? */ - group_calc_placement(ws, &g); + group_calc_placement(ws, level, &g); } fp.g=REGION_GEOM(ws); @@ -621,16 +671,7 @@ bool group_do_attach_final(WGroup *ws, if(rectangle_compare(&fp.g, ®ION_GEOM(reg))!=RECTANGLE_SAME) region_fitrep(reg, NULL, &fp); - /* Stacking & add */ - if(param->stack_above!=NULL) - stabove=group_find_stacking(ws, param->stack_above); - - level=(stabove!=NULL - ? stabove->level - : (param->level_set - ? param->level - : STACKING_LEVEL_NORMAL)); - + /* Add */ st=group_do_add_managed(ws, reg, level, szplcy); if(st==NULL) @@ -639,25 +680,10 @@ bool group_do_attach_final(WGroup *ws, if(stabove!=NULL) st->above=stabove; - /* Misc. */ - if(param->bottom){ - ws->bottom=st; - - if(HAS_DYN(reg, region_manage_stdisp) && ws->managed_stdisp!=NULL){ - WMPlex *mplex=OBJ_CAST(REGION_MANAGER(ws), WMPlex); - if(mplex!=NULL){ /* should always hold */ - WMPlexSTDispInfo di; - WRegion *stdisp=NULL; - mplex_get_stdisp(mplex, &stdisp, &di); - if(stdisp!=NULL){ - assert(stdisp==ws->managed_stdisp->reg); - /* WARNING! Calls back to group code (managed_remove). */ - region_manage_stdisp(reg, stdisp, &di); - } - } - } - } + if(param->bottom) + group_do_set_bottom(ws, st); + /* Focus */ sw=(param->switchto_set ? param->switchto : ioncore_g.switchto_new); if(sw || st->level>=STACKING_LEVEL_MODAL1){ @@ -895,6 +921,24 @@ void group_manage_stdisp(WGroup *ws, WRegion *stdisp, } +static void group_remanage_stdisp(WGroup *ws) +{ + WMPlex *mplex=OBJ_CAST(REGION_MANAGER(ws), WMPlex); + + if(mplex!=NULL && + mplex->mx_current!=NULL && + mplex->mx_current->st->reg==(WRegion*)ws){ + mplex_remanage_stdisp(mplex); + } +} + + +/*}}}*/ + + +/*{{{ Geometry requests */ + + void group_managed_rqgeom(WGroup *ws, WRegion *reg, const WRQGeomParams *rq, WRectangle *geomret) @@ -1148,16 +1192,6 @@ bool group_managed_rqorder(WGroup *grp, WRegion *reg, WRegionOrder order) /*{{{ Misc. */ -/*EXTL_DOC - * Returns the 'bottom' of \var{ws}. - */ -EXTL_EXPORT_MEMBER -WRegion *group_bottom(WGroup *ws) -{ - return (ws->bottom!=NULL ? ws->bottom->reg : NULL); -} - - /*EXTL_DOC * Iterate over managed regions of \var{ws} until \var{iterfn} returns * \code{false}. @@ -1198,14 +1232,31 @@ Window group_xwindow(const WGroup *ws) } -WRegion *region_group_if_bottom(WRegion *reg) +/*EXTL_DOC + * Returns the group of \var{reg}, if it is managed by one, + * and \var{reg} itself otherwise. + */ +/*EXTL_EXPORT_MEMBER +WRegion *region_group_of(WRegion *reg) +{ + WRegion *mgr=REGION_MANAGER(reg); + + return (OBJ_IS(mgr, WGroup) ? mgr : reg); +}*/ + + +/*EXTL_DOC + * Returns the group of \var{reg}, if \var{reg} is its bottom, + * and \var{reg} itself otherwise. + */ +EXTL_EXPORT_MEMBER +WRegion *region_groupleader_of(WRegion *reg) { WGroup *grp=REGION_MANAGER_CHK(reg, WGroup); - if(grp!=NULL && group_bottom(grp)==reg) - return (WRegion*)grp; - else - return reg; + return ((grp!=NULL && group_bottom(grp)==reg) + ? (WRegion*)grp + : reg); } @@ -1280,8 +1331,6 @@ void group_do_load(WGroup *ws, ExtlTab tab) extl_unref_table(substab); } - - ws->bottom_last_close=extl_table_is_bool_set(tab, "bottom_last_close"); } @@ -1331,11 +1380,8 @@ static DynFunTab group_dynfuntab[]={ {(DynFun*)region_get_configuration, (DynFun*)group_get_configuration}, - {(DynFun*)region_may_destroy, - (DynFun*)group_may_destroy}, - - {(DynFun*)region_managed_may_destroy, - (DynFun*)group_managed_may_destroy}, + {(DynFun*)region_managed_disposeroot, + (DynFun*)group_managed_disposeroot}, {(DynFun*)region_current, (DynFun*)group_current}, diff --git a/ioncore/group.h b/ioncore/group.h index cfc1b60..d9a37ea 100644 --- a/ioncore/group.h +++ b/ioncore/group.h @@ -57,7 +57,6 @@ DECLCLASS(WGroup){ WStacking *current_managed; WStacking *bottom; Window dummywin; - uint bottom_last_close:1; }; @@ -91,9 +90,12 @@ extern void group_manage_stdisp(WGroup *ws, WRegion *stdisp, extern void group_managed_remove(WGroup *ws, WRegion *reg); +extern void group_managed_notify(WGroup *ws, WRegion *reg, WRegionNotify how); + extern WRegion *group_bottom(WGroup *ws); +extern bool group_set_bottom(WGroup *ws, WRegion *reg); -extern bool group_rescue_clientwins(WGroup *ws, WPHolder *ph); +extern bool group_rescue_clientwins(WGroup *ws, WRescueInfo *info); extern bool group_rqclose(WGroup *ws); extern bool group_rqclose_relocate(WGroup *ws); @@ -104,7 +106,9 @@ extern bool group_managed_rqorder(WGroup *grp, WRegion *sub, extern WStacking *group_find_stacking(WGroup *ws, WRegion *r); extern WStacking *group_find_to_focus(WGroup *ws, WStacking *to_try); -extern WRegion *region_group_if_bottom(WRegion *reg); +extern WRegion *region_groupleader_of(WRegion *reg); +/*extern WRegion *region_group_of(WRegion *reg);*/ + typedef WStackingFilter WGroupIterFilter; typedef WStackingIterTmp WGroupIterTmp; diff --git a/ioncore/infowin.c b/ioncore/infowin.c index 463b16e..f3c2da9 100644 --- a/ioncore/infowin.c +++ b/ioncore/infowin.c @@ -19,6 +19,7 @@ #include "resize.h" #include "gr.h" #include "event.h" +#include "strings.h" /*{{{ Init/deinit */ @@ -198,9 +199,21 @@ static void infowin_resize(WInfoWin *p) * Set contents of the info window. */ EXTL_EXPORT_MEMBER -void infowin_set_text(WInfoWin *p, const char *str) +void infowin_set_text(WInfoWin *p, const char *str, int maxw) { - infowin_do_set_text(p, str); + bool set=FALSE; + + if(maxw>0 && p->brush!=NULL){ + char *tmp=grbrush_make_label(p->brush, str, maxw); + if(tmp!=NULL){ + infowin_do_set_text(p, tmp); + free(tmp); + set=TRUE; + } + } + + if(!set) + infowin_do_set_text(p, str); infowin_resize(p); diff --git a/ioncore/infowin.h b/ioncore/infowin.h index e51396b..799c128 100644 --- a/ioncore/infowin.h +++ b/ioncore/infowin.h @@ -37,7 +37,7 @@ extern WInfoWin *create_infowin(WWindow *parent, const WFitParams *fp, extern void infowin_deinit(WInfoWin *p); -extern void infowin_set_text(WInfoWin *p, const char *s); +extern void infowin_set_text(WInfoWin *p, const char *s, int maxw); extern GrStyleSpec *infowin_stylespec(WInfoWin *p); extern WRegion *infowin_load(WWindow *par, const WFitParams *fp, ExtlTab tab); diff --git a/ioncore/ioncore.c b/ioncore/ioncore.c index 62f616b..49da6c7 100644 --- a/ioncore/ioncore.c +++ b/ioncore/ioncore.c @@ -56,6 +56,9 @@ #include "group-cw.h" #include "group-ws.h" #include "llist.h" +#include "exec.h" +#include "screen-notify.h" + #include "../version.h" #include "exports.h" @@ -97,7 +100,7 @@ WHook *ioncore_deinit_hook=NULL; void ioncore_warn_nolog(const char *str) { - fprintf(stderr, "%s: %s\n", prog_execname(), str); + fprintf(stderr, "%s: %s\n", libtu_progname(), str); } @@ -253,12 +256,12 @@ static bool init_messages(const char *localedir) #define INIT_HOOK_(NM) \ NM=mainloop_register_hook(#NM, create_hook()); \ - if(NM==NULL) return FALSE; + if(NM==NULL) return FALSE -#define INIT_HOOK(NM, DFLT) \ - INIT_HOOK_(NM) \ - if(!hook_add(NM, (void (*)())DFLT)) return FALSE; +#define ADD_HOOK_(NM, FN) \ + if(!hook_add(NM, (void (*)())FN)) return FALSE +#define INIT_HOOK(NM, DFLT) INIT_HOOK_(NM); ADD_HOOK_(NM, DFLT) static bool init_hooks() { @@ -271,11 +274,15 @@ static bool init_hooks() INIT_HOOK_(clientwin_unmapped_hook); INIT_HOOK_(clientwin_property_change_hook); - INIT_HOOK(region_notify_hook, ioncore_frame_quasiactivation_notify); + INIT_HOOK_(region_notify_hook); + ADD_HOOK_(region_notify_hook, ioncore_frame_quasiactivation_notify); + ADD_HOOK_(region_notify_hook, ioncore_screen_activity_notify); + INIT_HOOK(clientwin_do_manage_alt, clientwin_do_manage_default); INIT_HOOK(ioncore_handle_event_alt, ioncore_handle_event); INIT_HOOK(region_do_warp_alt, region_do_warp_default); - + INIT_HOOK(ioncore_exec_environ_hook, ioncore_setup_environ); + mainloop_sigchld_hook=mainloop_register_hook("ioncore_sigchld_hook", create_hook()); mainloop_sigusr2_hook=mainloop_register_hook("ioncore_sigusr2_hook", @@ -321,6 +328,7 @@ static bool init_global() ioncore_g.screens=NULL; ioncore_g.focus_next=NULL; ioncore_g.warp_next=FALSE; + ioncore_g.focus_next_source=IONCORE_FOCUSNEXT_OTHER; ioncore_g.focus_current=NULL; @@ -330,6 +338,9 @@ static bool init_global() ioncore_g.opaque_resize=0; ioncore_g.warp_enabled=TRUE; ioncore_g.switchto_new=TRUE; + ioncore_g.no_mousefocus=FALSE; + ioncore_g.unsqueeze_enabled=TRUE; + ioncore_g.autoraise=TRUE; ioncore_g.enc_utf8=FALSE; ioncore_g.enc_sb=TRUE; @@ -354,6 +365,8 @@ static bool init_global() INITSTR(pseudoinactivated); INITSTR(tag); INITSTR(deinit); + INITSTR(map); + INITSTR(unmap); return TRUE; } diff --git a/ioncore/ioncore_menudb.lua b/ioncore/ioncore_menudb.lua index 98d86a2..4286054 100644 --- a/ioncore/ioncore_menudb.lua +++ b/ioncore/ioncore_menudb.lua @@ -63,34 +63,47 @@ function ioncore.getctxmenu(name) return menus["ctxmenu-"..name] end - -function ioncore.evalmenu(menu, args) +function ioncore.evalmenu(menu, ...) if type(menu)=="string" then - return ioncore.evalmenu(menus[menu], args) + return ioncore.evalmenu(menus[menu], ...) elseif type(menu)=="function" then - if args then - return menu(unpack(args)) - else - return menu() - end + return menu(...) elseif type(menu)=="table" then return menu end end - --DOC -- Use this function to define normal menu entries. The string \var{name} --- is the string shown in the visual representation of menu, and the --- parameter \var{cmd} and \var{guard} are similar to those of --- \fnref{ioncore.defbindings}. -function ioncore.menuentry(name, cmd, guard) +-- is the string shown in the visual representation of menu. The +-- parameter \var{cmd} and \var{guard_or_opts} (when string) are similar +-- to those of \fnref{ioncore.defbindings}. If \var{guard_or_opts} is +-- a table, it may contains the \var{guard} field, and the \var{priority} +-- field, for controlling positioning of entries in context menus. +-- (The default priority is 1 for most entries, and -1 for auto-generated +-- submenus.) +function ioncore.menuentry(name, cmd, guard_or_opts) + local guard + local opts + + if type(guard_or_opts)=="string" then + guard=guard_or_opts + elseif type(guard_or_opts)=="table" then + opts=guard_or_opts + guard=opts.guard + end + local fn, gfn=ioncore.compile_cmd(cmd, guard) if fn then - return {name=ioncore.gettext(name), func=fn, guard_func=gfn} + return table.append({ + name=ioncore.gettext(name), + func=fn, + guard_func=gfn, + }, opts or {}) end end + --DOC -- Use this function to define menu entries for submenus. The parameter -- \fnref{sub_or_name} is either a table of menu entries or the name @@ -100,17 +113,12 @@ end -- \var{options.noautoexpand} that will cause \fnref{mod_query.query_menu} -- to not automatically expand this submenu. function ioncore.submenu(name, sub_or_name, options) - if not options then - options={} - end - return { - name=ioncore.gettext(name), - submenu_fn=function() - return ioncore.evalmenu(sub_or_name) - end, - initial=options.initial, - noautoexpand=options.noautoexpand, - } + return table.append({ + name=ioncore.gettext(name), + submenu_fn=function() + return ioncore.evalmenu (sub_or_name) + end, + }, options or {}) end @@ -175,11 +183,16 @@ local function focuslist(do_act) end if do_act then + -- Windows with activity first ioncore.activity_i(iter_act) end + -- The ones that have been focused in their lifetime ioncore.focushistory_i(iter_foc) + -- And then the rest + ioncore.clientwin_i(iter_foc) + return entries end @@ -329,7 +342,7 @@ local function modeparts(mode) end -local function get_ctxmenu(reg, sub, is_par) +local function get_ctxmenu(reg, sub) local m={} local function cp(m2) @@ -355,11 +368,7 @@ local function get_ctxmenu(reg, sub, is_par) local function add_ctxmenu(m2, use_label) if m2 then - if is_par then - m2=cp(m2) - end - - m=table.icat(m, m2) + m=table.icat(m, cp(m2)) m.label=(use_label and m2.label) or m.label end end @@ -381,23 +390,49 @@ local function get_ctxmenu(reg, sub, is_par) return m end -function menus.ctxmenu(reg, sub) - local m=get_ctxmenu(reg, sub, false); + +local function sortmenu(m) + local v=1/2 + + for _, e in ipairs(m) do + e.priority=(e.priority or 1)+v + v=v/2 + end + + table.sort(m, function(e1, e2) return e1.priority > e2.priority end) + + return m +end + + +function menus.ctxmenu(reg, sub_or_chld) + local m, r, s - sub=reg - reg=reg:manager() + -- First, stuff between reg (inclusive) and sub_or_chld (inclusive) + -- at the top level in the menu. + r=(sub_or_chld or reg) + while r and s~=reg do + local mm=get_ctxmenu(r, s) + m=((m and table.icat(mm, m)) or mm) + s=r + r=r:manager() + end + + m=(m or {}) - while reg do - local mm = get_ctxmenu(reg, sub, true) + -- Then stuff below reg (exclusive) as submenus + while r do + local mm = get_ctxmenu(r, s) if #mm>0 then local nm=mm.label or obj_typename(reg) - table.insert(m, ioncore.submenu(nm, mm)) + local tmp=ioncore.submenu(nm, sortmenu(mm), {priority=-1}) + table.insert(m, tmp) end - sub=reg - reg=reg:manager() + s=r + r=r:manager() end - return m + return sortmenu(m) end -- }}} diff --git a/ioncore/ioncore_misc.lua b/ioncore/ioncore_misc.lua index 3b24b66..4637279 100644 --- a/ioncore/ioncore_misc.lua +++ b/ioncore/ioncore_misc.lua @@ -80,10 +80,24 @@ function ioncore.TR(s, ...) end ---[[DOC --- Run \var{cmd} with the environment variable DISPLAY set to point to the --- root window of the X screen \var{reg} is on. -function ioncore.exec_on(reg, cmd) - return ioncore.do_exec_rw(reg:rootwin_of(), cmd) +--DOC +-- Attach tagged regions to \var{reg}. The method of attach +-- depends on the types of attached regions and whether \var{reg} +-- implements \code{attach_framed} and \code{attach}. If \var{param} +-- is not set, the default of \verb!{switchto=true}! is used. +function ioncore.tagged_attach(reg, param) + if not param then + param={switchto=true} + end + local tagged=function() return ioncore.tagged_first(true) end + for r in tagged do + local fn=((not obj_is(r, "WWindow") and reg.attach_framed) + or reg.attach) + + if not (fn and fn(reg, r, param)) then + return false + end + end + return true end ---]] + diff --git a/ioncore/ioncore_wd.lua b/ioncore/ioncore_wd.lua index a908d3e..8b1f6ce 100644 --- a/ioncore/ioncore_wd.lua +++ b/ioncore/ioncore_wd.lua @@ -123,8 +123,7 @@ function ioncore.exec_on(reg, cmd, merr_internal) cmd='XTERMCMD='..string.shell_safe(XTERM)..' '..cmd end end - return ioncore.do_exec_rw(reg:rootwin_of(), cmd, - ioncore.get_dir_for(reg), + return ioncore.do_exec_on(reg, cmd, ioncore.get_dir_for(reg), merr_internal) end diff --git a/ioncore/kbresize.c b/ioncore/kbresize.c index 012a931..b4dbc7b 100644 --- a/ioncore/kbresize.c +++ b/ioncore/kbresize.c @@ -137,6 +137,8 @@ void moveresmode_accel(WMoveresMode *mode, int *wu, int *hu, int accel_mode) static ExtlExportedFn *moveres_safe_fns[]={ (ExtlExportedFn*)&moveresmode_resize, (ExtlExportedFn*)&moveresmode_move, + (ExtlExportedFn*)&moveresmode_rqgeom_extl, + (ExtlExportedFn*)&moveresmode_geom, (ExtlExportedFn*)&moveresmode_finish, (ExtlExportedFn*)&moveresmode_cancel, NULL @@ -309,6 +311,33 @@ void moveresmode_move(WMoveresMode *mode, int horizmul, int vertmul) } +/*EXTL_DOC + * Request exact geometry in move/resize mode. For details on parameters, + * see \fnref{WRegion.rqgeom}. + */ +EXTL_EXPORT_AS(WMoveresMode, rqgeom) +ExtlTab moveresmode_rqgeom_extl(WMoveresMode *mode, ExtlTab g) +{ + WRQGeomParams rq=RQGEOMPARAMS_INIT; + WRectangle res; + + rqgeomparams_from_table(&rq, &mode->geom, g); + + moveresmode_rqgeom(mode, &rq, &res); + + return extl_table_from_rectangle(&res); +} + +/*EXTL_DOC + * Returns current geometry. + */ +EXTL_EXPORT_MEMBER +ExtlTab moveresmode_geom(WMoveresMode *mode) +{ + return extl_table_from_rectangle(&mode->geom); +} + + /*EXTL_DOC * Return from move/resize mode and apply changes unless opaque * move/resize is enabled. diff --git a/ioncore/kbresize.h b/ioncore/kbresize.h index a3841c0..637cf63 100644 --- a/ioncore/kbresize.h +++ b/ioncore/kbresize.h @@ -28,6 +28,8 @@ extern void moveresmode_move(WMoveresMode *mode, int horizmul, int vertmul); extern void moveresmode_resize(WMoveresMode *mode, int left, int right, int top, int bottom); +extern ExtlTab moveresmode_geom(WMoveresMode *mode); +extern ExtlTab moveresmode_rqgeom_extl(WMoveresMode *mode, ExtlTab g); extern void moveresmode_accel(WMoveresMode *mode, int *wu, int *hu, int accel_mode); diff --git a/ioncore/manage.c b/ioncore/manage.c index fda8d7b..2eb6f38 100644 --- a/ioncore/manage.c +++ b/ioncore/manage.c @@ -22,6 +22,7 @@ #include "extlconv.h" #include "return.h" #include "conf.h" +#include "detach.h" #include "group-ws.h" @@ -135,15 +136,56 @@ static bool handle_target_winprops(WClientWin *cwin, const WManageParams *param, } +static bool try_fullscreen(WClientWin *cwin, WScreen *dflt, + const WManageParams *param) +{ + WScreen *fs_scr=NULL; + bool fs=FALSE, tmp; + + /* Check fullscreen mode. (This is intentionally not done + * for transients and windows with target winprops.) + */ + if(extl_table_gets_b(cwin->proptab, "fullscreen", &tmp)){ + if(!tmp) + return FALSE; + fs_scr=dflt; + } + + if(fs_scr==NULL) + fs_scr=netwm_check_initial_fullscreen(cwin); + + if(fs_scr==NULL) + fs_scr=clientwin_fullscreen_chkrq(cwin, param->geom.w, param->geom.h); + + if(fs_scr!=NULL){ + WPHolder *fs_ph=region_prepare_manage((WRegion*)fs_scr, cwin, param, + MANAGE_REDIR_STRICT_NO); + + if(fs_ph!=NULL){ + int swf=(param->switchto ? PHOLDER_ATTACH_SWITCHTO : 0); + + cwin->flags|=CLIENTWIN_FS_RQ; + + fs=pholder_attach(fs_ph, swf, (WRegion*)cwin); + + if(!fs) + cwin->flags&=~CLIENTWIN_FS_RQ; + + destroy_obj((Obj*)fs_ph); + } + } + + return fs; +} + + bool clientwin_do_manage_default(WClientWin *cwin, const WManageParams *param) { - WRegion *r=NULL, *r2; WScreen *scr=NULL; WPHolder *ph=NULL; - int fs=-1; - int swf; - bool ok, tmp; + int swf=(param->switchto ? PHOLDER_ATTACH_SWITCHTO : 0); + bool ok, uq=FALSE; /* Find a suitable screen */ scr=clientwin_find_suitable_screen(cwin, param); @@ -160,6 +202,7 @@ bool clientwin_do_manage_default(WClientWin *cwin, assert(param->tfor!=cwin); ph=region_prepare_manage_transient((WRegion*)param->tfor, cwin, param, 0); + uq=TRUE; } if(ph==NULL){ @@ -167,46 +210,30 @@ bool clientwin_do_manage_default(WClientWin *cwin, ph=region_prepare_manage((WRegion*)scr, cwin, param, MANAGE_REDIR_PREFER_YES); - /* Check fullscreen mode. (This is intentionally not done - * for transients and windows with target winprops.) - */ - if(extl_table_gets_b(cwin->proptab, "fullscreen", &tmp)) - fs=tmp; - - if(fs<0) - fs=netwm_check_initial_fullscreen(cwin, param->switchto); - - if(fs<0){ - fs=clientwin_check_fullscreen_request(cwin, - param->geom.w, - param->geom.h, - param->switchto); - } - } - - if(fs>0){ - /* Full-screen mode succesfull. */ - if(pholder_target(ph)==(WRegion*)scr){ - /* Discard useless placeholder. */ + if(try_fullscreen(cwin, scr, param)){ + if(pholder_target(ph)!=(WRegion*)region_screen_of((WRegion*)cwin)){ + WRegion *grp=region_groupleader_of((WRegion*)cwin); + if(region_do_set_return(grp, ph)) + return TRUE; + } destroy_obj((Obj*)ph); return TRUE; } - if(!region_do_set_return((WRegion*)cwin, ph)) - destroy_obj((Obj*)ph); - - return TRUE; } - + if(ph==NULL) return FALSE; /* Not in full-screen mode; use the placeholder to attach. */ - swf=(param->switchto ? PHOLDER_ATTACH_SWITCHTO : 0); ok=pholder_attach(ph, swf, (WRegion*)cwin); + destroy_obj((Obj*)ph); + if(uq && ok) + ioncore_unsqueeze((WRegion*)cwin, FALSE); + return ok; } @@ -294,6 +321,14 @@ bool region_manage_clientwin(WRegion *reg, WClientWin *cwin, /*{{{ Rescue */ +DECLSTRUCT(WRescueInfo){ + WPHolder *ph; + WRegion *get_rescue; + bool failed_get; + bool test; +}; + + static WRegion *iter_children(void *st) { WRegion **nextp=(WRegion**)st; @@ -303,50 +338,101 @@ static WRegion *iter_children(void *st) } -bool region_rescue_child_clientwins(WRegion *reg, WPHolder *ph) +bool region_rescue_child_clientwins(WRegion *reg, WRescueInfo *info) { WRegion *next=reg->children; - return region_rescue_some_clientwins(reg, ph, iter_children, &next); + return region_rescue_some_clientwins(reg, info, iter_children, &next); } -bool region_rescue_some_clientwins(WRegion *reg, WPHolder *ph, +bool region_rescue_some_clientwins(WRegion *reg, WRescueInfo *info, WRegionIterator *iter, void *st) { bool res=FALSE; int fails=0; + if(info->failed_get) + return FALSE; + reg->flags|=REGION_CWINS_BEING_RESCUED; while(TRUE){ WRegion *tosave=iter(st); + WClientWin *cwin; if(tosave==NULL) break; - if(!OBJ_IS(tosave, WClientWin)){ - if(!region_rescue_clientwins(tosave, ph)) + cwin=OBJ_CAST(tosave, WClientWin); + + if(cwin==NULL){ + if(!region_rescue_clientwins(tosave, info)){ fails++; - }else{ - if(!pholder_attach(ph, 0, tosave)) + if(info->failed_get) + break; + } + }else if(info->test){ + fails++; + break; + }else if(!(cwin->flags&CLIENTWIN_UNMAP_RQ)){ + if(info->ph==NULL){ + info->ph=region_get_rescue_pholder(info->get_rescue); + if(info->ph==NULL){ + info->failed_get=TRUE; + break; + } + } + if(!pholder_attach(info->ph, 0, (WRegion*)cwin)) fails++; } } reg->flags&=~REGION_CWINS_BEING_RESCUED; - return (fails==0); + return (fails==0 && !info->failed_get); } -bool region_rescue_clientwins(WRegion *reg, WPHolder *ph) +bool region_rescue_clientwins(WRegion *reg, WRescueInfo *info) { bool ret=FALSE; - CALL_DYN_RET(ret, bool, region_rescue_clientwins, reg, (reg, ph)); + CALL_DYN_RET(ret, bool, region_rescue_clientwins, reg, (reg, info)); + return ret; +} + + +bool region_rescue(WRegion *reg, WPHolder *ph_param) +{ + WRescueInfo info; + bool ret; + + info.ph=ph_param; + info.test=FALSE; + info.get_rescue=reg; + info.failed_get=FALSE; + + ret=region_rescue_clientwins(reg, &info); + + if(info.ph!=ph_param) + destroy_obj((Obj*)info.ph); + return ret; } +bool region_rescue_needed(WRegion *reg) +{ + WRescueInfo info; + + info.ph=NULL; + info.test=TRUE; + info.get_rescue=reg; + info.failed_get=FALSE; + + return !region_rescue_clientwins(reg, &info); +} + + /*}}}*/ diff --git a/ioncore/manage.h b/ioncore/manage.h index 5b81f3d..45ddf6a 100644 --- a/ioncore/manage.h +++ b/ioncore/manage.h @@ -84,9 +84,14 @@ extern WPHolder *region_prepare_manage_transient_default(WRegion *reg, /* Rescue */ -extern bool region_rescue_clientwins(WRegion *reg, WPHolder *ph); -extern bool region_rescue_child_clientwins(WRegion *reg, WPHolder *ph); -extern bool region_rescue_some_clientwins(WRegion *reg, WPHolder *ph, +INTRSTRUCT(WRescueInfo); + +/* if ph is given, it is used, otherwise one is looked for when needed */ +extern bool region_rescue(WRegion *reg, WPHolder *ph); +extern bool region_rescue_needed(WRegion *reg); +extern bool region_rescue_clientwins(WRegion *reg, WRescueInfo *info); +extern bool region_rescue_child_clientwins(WRegion *reg, WRescueInfo *info); +extern bool region_rescue_some_clientwins(WRegion *reg, WRescueInfo *info, WRegionIterator *iter, void *st); diff --git a/ioncore/mplex.c b/ioncore/mplex.c index a202e7c..28dc48a 100644 --- a/ioncore/mplex.c +++ b/ioncore/mplex.c @@ -158,17 +158,6 @@ void mplex_deinit(WMPlex *mplex) } -bool mplex_may_destroy(WMPlex *mplex) -{ - if(mplex->mgd!=NULL){ - warn(TR("Refusing to destroy - not empty.")); - return FALSE; - } - - return TRUE; -} - - /*}}}*/ @@ -292,8 +281,8 @@ bool mplex_managed_i(WMPlex *mplex, ExtlFn iterfn) /*EXTL_DOC - * Set index of \var{reg} within the multiplexer to \var{index} within - * the mutually exclusive list. Special values for \var{index} are: + * Set index of \var{reg} to \var{index} within the mutually exclusive + * list of \var{mplex}. Special values for \var{index} are: * \begin{tabularx}{\linewidth}{lX} * $-1$ & Last. \\ * $-2$ & After \fnref{WMPlex.mx_current}. \\ @@ -327,8 +316,6 @@ void mplex_set_index(WMPlex *mplex, WRegion *reg, int index) llist_unlink(&(mplex->mx_list), lnode); } - /* TODO: Support remove? */ - after=llist_index_to_after(mplex->mx_list, mplex->mx_current, index); llist_link_after(&(mplex->mx_list), after, lnode); mplex_managed_changed(mplex, MPLEX_CHANGE_REORDER, FALSE, reg); @@ -336,9 +323,9 @@ void mplex_set_index(WMPlex *mplex, WRegion *reg, int index) /*EXTL_DOC - * Get index of \var{reg} within the multiplexer on list 1. The first region - * managed by \var{mplex} has index zero. If \var{reg} is not managed by - * \var{mplex}, -1 is returned. + * Get index of \var{reg} on the mutually exclusive list of \var{mplex}. + * The indices begin from zero.. If \var{reg} is not on the list, + * -1 is returned. */ EXTL_SAFE EXTL_EXPORT_MEMBER @@ -527,7 +514,7 @@ static void mplex_managed_rqgeom(WMPlex *mplex, WRegion *sub, /*{{{ Focus */ -static WRegion *mplex_do_to_focus(WMPlex *mplex, WStacking *to_try) +static WStacking *mplex_do_to_focus(WMPlex *mplex, WStacking *to_try) { WStacking *stacking=mplex_get_stacking(mplex); WStacking *st=NULL; @@ -541,28 +528,54 @@ static WRegion *mplex_do_to_focus(WMPlex *mplex, WStacking *to_try) st=stacking_find_to_focus_mapped(stacking, to_try, NULL); if(st!=NULL) - return st->reg; + return st; else if(mplex->mx_current!=NULL) - return mplex->mx_current->st->reg; + return mplex->mx_current->st; else return NULL; } -WRegion *mplex_to_focus(WMPlex *mplex) +static WStacking *maybe_focusable(WRegion *reg) { - WRegion *reg=REGION_ACTIVE_SUB(mplex); - WStacking *to_try=NULL; + if(reg==NULL || !REGION_IS_MAPPED(reg)) + return NULL; + + return ioncore_find_stacking(reg); +} + + +static WStacking *stacking_within(WMPlex *mplex, WRegion *reg) +{ + while(reg!=NULL && REGION_MANAGER(reg)!=(WRegion*)mplex) + reg=REGION_MANAGER(reg); - if(reg!=NULL) - to_try=ioncore_find_stacking(reg); + return maybe_focusable(reg); +} + +static WStacking *mplex_to_focus(WMPlex *mplex) +{ + WStacking *to_try=NULL; + WRegion *reg=NULL; + + to_try=maybe_focusable(REGION_ACTIVE_SUB(mplex)); + + if(to_try==NULL){ + /* Search focus history */ + for(reg=ioncore_g.focus_current; reg!=NULL; reg=reg->active_next){ + to_try=stacking_within(mplex, reg); + if(to_try!=NULL) + break; + } + } + return mplex_do_to_focus(mplex, to_try); } -static WRegion *mplex_do_to_focus_on(WMPlex *mplex, WStacking *node, - WStacking *to_try) +static WStacking *mplex_do_to_focus_on(WMPlex *mplex, WStacking *node, + WStacking *to_try) { WStacking *stacking=mplex_get_stacking(mplex); WStacking *st=NULL; @@ -573,42 +586,40 @@ static WRegion *mplex_do_to_focus_on(WMPlex *mplex, WStacking *node, if(to_try!=NULL && (to_try->reg==NULL || !REGION_IS_MAPPED(to_try->reg))) to_try=NULL; - st=stacking_find_to_focus_mapped(stacking, to_try, node->reg); - - return (st!=NULL ? st->reg : NULL); + return stacking_find_to_focus_mapped(stacking, to_try, node->reg); } -static WRegion *mplex_to_focus_on(WMPlex *mplex, WStacking *node, - WStacking *to_try) +static WStacking *mplex_to_focus_on(WMPlex *mplex, WStacking *node, + WStacking *to_try) { - WRegion *reg; WGroup *grp=OBJ_CAST(node->reg, WGroup); + WStacking *st; if(grp!=NULL){ if(to_try==NULL) to_try=grp->current_managed; - reg=mplex_do_to_focus_on(mplex, node, to_try); - if(reg!=NULL || to_try!=NULL) - return reg; + st=mplex_do_to_focus_on(mplex, node, to_try); + if(st!=NULL || to_try!=NULL) + return st; /* We don't know whether something is blocking focus here, * or if there was nothing to focus (as node->reg itself * isn't on the stacking list). */ } - reg=mplex_do_to_focus(mplex, node); - return (reg==node->reg ? reg : NULL); + st=mplex_do_to_focus(mplex, node); + return (st==node ? st : NULL); } void mplex_do_set_focus(WMPlex *mplex, bool warp) { if(!MPLEX_MGD_UNVIEWABLE(mplex)){ - WRegion *reg=mplex_to_focus(mplex); + WStacking *st=mplex_to_focus(mplex); - if(reg!=NULL){ - region_do_set_focus(reg, warp); + if(st!=NULL){ + region_do_set_focus(st->reg, warp); return; } } @@ -630,25 +641,19 @@ static void mplex_do_remanage_stdisp(WMPlex *mplex, WRegion *sub) /* Move stdisp */ if(sub!=NULL && CAN_MANAGE_STDISP(sub)){ if(stdisp!=NULL){ - WRegion *mgrw=region_managed_within((WRegion*)mplex, stdisp); - if(mgrw!=sub){ - WRegion *mgr=REGION_MANAGER(stdisp); - if(mgr!=NULL){ - if(CAN_MANAGE_STDISP(mgr)) - region_unmanage_stdisp(mgr, FALSE, FALSE); - region_detach_manager(stdisp); - } - - region_manage_stdisp(sub, stdisp, - &(mplex->stdispinfo)); + WRegion *omgr=REGION_MANAGER(stdisp); + if(omgr!=sub && omgr!=NULL){ + if(CAN_MANAGE_STDISP(omgr)) + region_unmanage_stdisp(omgr, FALSE, FALSE); + region_detach_manager(stdisp); } + + region_manage_stdisp(sub, stdisp, + &(mplex->stdispinfo)); }else{ region_unmanage_stdisp(sub, TRUE, FALSE); } - }/*else if(stdisp!=NULL){ - region_detach_manager(stdisp); - region_unmap(stdisp); - }*/ + } } @@ -699,11 +704,13 @@ static void mplex_do_node_display(WMPlex *mplex, WStacking *node, * no visible netscape windows. */ { - #warning "TODO: less ugly hack" WGroup *grp=(WGroup*)OBJ_CAST(sub, WGroupCW); - if(grp!=NULL && grp->bottom!=NULL){ - region_managed_rqorder((WRegion*)grp, grp->bottom->reg, - REGION_ORDER_BACK); + if(grp!=NULL){ + WRegion *bottom=group_bottom(grp); + if(bottom!=NULL){ + region_managed_rqorder((WRegion*)grp, bottom, + REGION_ORDER_BACK); + } } } @@ -715,7 +722,7 @@ static void mplex_do_node_display(WMPlex *mplex, WStacking *node, static bool mplex_refocus(WMPlex *mplex, WStacking *node, bool warp) { - WRegion *foc=NULL; + WStacking *foc=NULL; bool ret=TRUE; if(node!=NULL){ @@ -728,8 +735,8 @@ static bool mplex_refocus(WMPlex *mplex, WStacking *node, bool warp) foc=mplex_to_focus(mplex); } - if(foc!=NULL /* && !REGION_IS_ACTIVE(foc) */ ) - region_maybewarp(foc, warp); + if(foc!=NULL) + region_maybewarp(foc->reg, warp); return ret; } @@ -739,7 +746,7 @@ bool mplex_do_prepare_focus(WMPlex *mplex, WStacking *node, WStacking *sub, int flags, WPrepareFocusResult *res) { - WRegion *foc; + WStacking *foc; if(sub==NULL && node==NULL) return FALSE; @@ -757,13 +764,20 @@ bool mplex_do_prepare_focus(WMPlex *mplex, WStacking *node, foc=mplex_do_to_focus(mplex, sub); if(foc!=NULL){ - res->reg=foc; + if(ioncore_g.autoraise && + !(flags®ION_GOTO_ENTERWINDOW) && + foc->level>STACKING_LEVEL_BOTTOM){ + WStacking **stackingp=mplex_get_stackingp(mplex); + stacking_restack(stackingp, foc, None, NULL, NULL, FALSE); + } + + res->reg=foc->reg; res->flags=flags; if(sub==NULL) - return (foc==node->reg); + return (foc==node); else - return (foc==sub->reg); + return (foc==sub); }else{ return FALSE; } @@ -940,13 +954,8 @@ static WRegion *do_navi(WMPlex *mplex, WStacking *sti, if(OBJ_IS(st->reg, WGroup)){ /* WGroup navigation code should respect modal stuff. */ WRegion *res=region_navi_cont((WRegion*)mplex, st->reg, data); - if(res!=NULL){ - if(res!=st->reg){ - return res; - }else{ - #warning "TODO: What to do?" - } - } + if(res!=NULL && res!=st->reg) + return res; }else{ if(st->level>=min_level && !PASSIVE(st)) return region_navi_cont((WRegion*)mplex, st->reg, data); @@ -1084,12 +1093,20 @@ bool mplex_do_attach_final(WMPlex *mplex, WRegion *reg, WMPlexPHolder *ph) WLListNode *lnode=NULL; WMPlexAttachParams *param=&ph->param; bool mx_was_empty, sw, modal, mcf, hidden; + WSizePolicy szplcy; uint level; mcf=region_may_control_focus((WRegion*)mplex); mx_was_empty=(mplex->mx_list==NULL); + szplcy=((param->flags&MPLEX_ATTACH_SIZEPOLICY && + param->szplcy!=SIZEPOLICY_DEFAULT) + ? param->szplcy + : (param->flags&MPLEX_ATTACH_UNNUMBERED + ? SIZEPOLICY_FULL_BOUNDS + : SIZEPOLICY_FULL_EXACT)); + modal=(param->flags&MPLEX_ATTACH_LEVEL ? param->level>=STACKING_LEVEL_MODAL1 : param->flags&MPLEX_ATTACH_MODAL); @@ -1113,7 +1130,6 @@ bool mplex_do_attach_final(WMPlex *mplex, WRegion *reg, WMPlexPHolder *ph) hidden=(hidden || (!sw && !(param->flags&MPLEX_ATTACH_UNNUMBERED))); - node=create_stacking(); if(node==NULL) @@ -1142,7 +1158,7 @@ bool mplex_do_attach_final(WMPlex *mplex, WRegion *reg, WMPlexPHolder *ph) } node->hidden=TRUE; - node->szplcy=param->szplcy; + node->szplcy=szplcy; node->level=level; if(lnode!=NULL){ @@ -1163,6 +1179,19 @@ bool mplex_do_attach_final(WMPlex *mplex, WRegion *reg, WMPlexPHolder *ph) region_set_manager(reg, (WRegion*)mplex); + if(!(param->flags&MPLEX_ATTACH_WHATEVER)){ + WFitParams fp; + + mplex_managed_geom(mplex, &(fp.g)); + + sizepolicy(&node->szplcy, reg, + (param->flags&MPLEX_ATTACH_GEOM ? &(param->geom) : NULL), + 0, &fp); + + if(rectangle_compare(&fp.g, ®ION_GEOM(reg))!=RECTANGLE_SAME) + region_fitrep(reg, NULL, &fp); + } + if(!hidden) mplex_do_node_display(mplex, node, FALSE); else @@ -1182,37 +1211,19 @@ WRegion *mplex_do_attach_pholder(WMPlex *mplex, WMPlexPHolder *ph, WRegionAttachData *data) { WMPlexAttachParams *param=&(ph->param); - WSizePolicy szplcy=param->szplcy; WFitParams fp; - WRegion *reg; - - param->szplcy=(param->flags&MPLEX_ATTACH_SIZEPOLICY && - param->szplcy!=SIZEPOLICY_DEFAULT - ? param->szplcy - : (param->flags&MPLEX_ATTACH_UNNUMBERED - ? SIZEPOLICY_FULL_BOUNDS - : SIZEPOLICY_FULL_EXACT)); - - mplex_managed_geom(mplex, &(fp.g)); - - sizepolicy(¶m->szplcy, NULL, - (param->flags&MPLEX_ATTACH_GEOM - ? &(param->geom) - : NULL), - 0, &fp); - if(param->flags&MPLEX_ATTACH_WHATEVER) - fp.mode|=REGION_FIT_WHATEVER; - - reg=region_attach_helper((WRegion*)mplex, - (WWindow*)mplex, &fp, - (WRegionDoAttachFn*)mplex_do_attach_final, - (void*)ph, data); + if(param->flags&MPLEX_ATTACH_GEOM) + fp.g=param->geom; + else + mplex_managed_geom(mplex, &(fp.g)); - /* restore */ - ph->param.szplcy=szplcy; + fp.mode=REGION_FIT_WHATEVER|REGION_FIT_BOUNDS; - return reg; + return region_attach_helper((WRegion*)mplex, + (WWindow*)mplex, &fp, + (WRegionDoAttachFn*)mplex_do_attach_final, + (void*)ph, data); } @@ -1274,15 +1285,6 @@ static void get_params(WMPlex *mplex, ExtlTab tab, int mask, int tmp; int ok=~mask; - if(mask==0 && extl_table_gets_i(tab, "layer", &tmp)){ - /* backwards compatibility. No need to consider masked cases */ - if(tmp==2){ - par->flags|=MPLEX_ATTACH_UNNUMBERED; - if(!extl_table_is_bool_set(tab, "passive")) - par->flags|=MPLEX_ATTACH_MODAL; - } - } - if(extl_table_gets_i(tab, "level", &tmp)){ if(tmp>=0 && ok&MPLEX_ATTACH_LEVEL){ par->flags|=MPLEX_ATTACH_LEVEL; @@ -1372,8 +1374,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{sizepolicy} & (integer) Size policy. - * (TODO: document them somewhere.) \\ + * \var{sizepolicy} & (integer) Size policy. \\ * \var{geom} & (table) Geometry specification. \\ * \end{tabularx} * @@ -1389,22 +1390,6 @@ WRegion *mplex_attach_new(WMPlex *mplex, ExtlTab param) } -/*EXTL_DOC - * Attach all tagged regions to \var{mplex}. - */ -EXTL_EXPORT_MEMBER -void mplex_attach_tagged(WMPlex *mplex) -{ - WRegion *reg; - int flags=MPLEX_ATTACH_SWITCHTO; - - while((reg=ioncore_tagged_take_first())!=NULL){ - mplex_attach_simple(mplex, reg, flags); - /*flags=0;*/ - } -} - - static bool mplex_handle_drop(WMPlex *mplex, int x, int y, WRegion *dropped) { @@ -1456,7 +1441,7 @@ WPHolder *mplex_prepare_manage(WMPlex *mplex, const WClientWin *cwin, ap.flags=((param->switchto ? MPLEX_ATTACH_SWITCHTO : 0) |MPLEX_ATTACH_SIZEPOLICY); - ap.szplcy=SIZEPOLICY_FULL_BOUNDS; + ap.szplcy=SIZEPOLICY_FULL_EXACT; mph=create_mplexpholder(mplex, NULL, &ap); @@ -1546,17 +1531,17 @@ void mplex_managed_remove(WMPlex *mplex, WRegion *sub) } -bool mplex_rescue_clientwins(WMPlex *mplex, WPHolder *ph) +bool mplex_rescue_clientwins(WMPlex *mplex, WRescueInfo *info) { bool ret1, ret2; WMPlexIterTmp tmp; mplex_iter_init(&tmp, mplex); - ret1=region_rescue_some_clientwins((WRegion*)mplex, ph, + ret1=region_rescue_some_clientwins((WRegion*)mplex, info, (WRegionIterator*)mplex_iter, &tmp); - ret2=region_rescue_child_clientwins((WRegion*)mplex, ph); + ret2=region_rescue_child_clientwins((WRegion*)mplex, info); return (ret1 && ret2); } @@ -1632,7 +1617,7 @@ bool mplex_set_stdisp(WMPlex *mplex, WRegion *reg, } if(oldstdisp!=NULL && oldstdisp!=reg) - region_dispose((WRegion*)oldstdisp, FALSE); + mainloop_defer_destroy((Obj*)oldstdisp); return TRUE; } @@ -1904,7 +1889,6 @@ static void save_node(WMPlex *mplex, ExtlTab subs, int *n, st=region_get_configuration(node->reg); if(st!=extl_table_none()){ - /*"TODO: better switchto saving? */ if(mplex->mx_current!=NULL && node==mplex->mx_current->st) extl_table_sets_b(st, "switchto", TRUE); extl_table_sets_i(st, "sizepolicy", node->szplcy); @@ -2075,9 +2059,6 @@ static DynFunTab mplex_dynfuntab[]={ {(DynFun*)region_get_rescue_pholder_for, (DynFun*)mplex_get_rescue_pholder_for}, - {(DynFun*)region_may_destroy, - (DynFun*)mplex_may_destroy}, - {(DynFun*)region_navi_first, (DynFun*)mplex_navi_first}, diff --git a/ioncore/mplex.h b/ioncore/mplex.h index 829c841..21e4a81 100644 --- a/ioncore/mplex.h +++ b/ioncore/mplex.h @@ -140,12 +140,10 @@ extern WRegion *mplex_do_attach(WMPlex *mplex, WMPlexAttachParams *param, extern WRegion *mplex_do_attach_new(WMPlex *mplex, WMPlexAttachParams *param, WRegionCreateFn *fn, void *fn_param); -extern void mplex_attach_tagged(WMPlex *mplex); - extern void mplex_managed_remove(WMPlex *mplex, WRegion *reg); extern void mplex_child_removed(WMPlex *mplex, WRegion *sub); -extern bool mplex_rescue_clientwins(WMPlex *mplex, WPHolder *ph); +extern bool mplex_rescue_clientwins(WMPlex *mplex, WRescueInfo *info); extern WPHolder *mplex_prepare_manage(WMPlex *mplex, const WClientWin *cwin, const WManageParams *param, int redir); @@ -176,7 +174,6 @@ extern bool mplex_managed_rqorder(WMPlex *mplex, WRegion *sub, /* Misc */ extern WRegion *mplex_current(WMPlex *mplex); -extern bool mplex_may_destroy(WMPlex *mplex); extern bool mplex_managed_i(WMPlex *mplex, ExtlFn iterfn); @@ -188,8 +185,6 @@ extern WRegion *mplex_mx_current(WMPlex *mplex); extern void mplex_call_changed_hook(WMPlex *mplex, WHook *hook, int mode, bool sw, WRegion *reg); -extern WLListNode *mplex_find_node(WMPlex *mplex, WRegion *reg); - extern void mplex_remanage_stdisp(WMPlex *mplex); /* Dynfuns */ diff --git a/ioncore/mplexpholder.c b/ioncore/mplexpholder.c index f6d089a..478ac2d 100644 --- a/ioncore/mplexpholder.c +++ b/ioncore/mplexpholder.c @@ -245,7 +245,8 @@ WRegion *recreate_handler(WWindow *par, static WMPlexPHolder *get_head(WMPlexPHolder *ph) { while(1){ - if(ph->prev->next==NULL) + /* ph->prev==NULL should not happen.. */ + if(ph->prev==NULL || ph->prev->next==NULL) break; ph=ph->prev; } diff --git a/ioncore/navi.c b/ioncore/navi.c index 7a10e6b..7109038 100644 --- a/ioncore/navi.c +++ b/ioncore/navi.c @@ -230,12 +230,12 @@ static WRegion *release(WRegionNaviData *data, WRegion *res) /*EXTL_DOC * Find region next from \var{reg} in direction \var{dirstr} - * (up/down/left/right/next/prev/any). The table param may + * (up/down/left/right/next/prev/any). The table \var{param} may * contain the boolean field \var{nowrap}, instructing not to wrap * around, and the \type{WRegion}s \var{no_ascend} and \var{no_descend}, - * and functions \var{ascend_filter} and \var{descend_filter} from - * \var{WRegion}s (\var{to}, \var{from}), used to decide when to descend - * or ascend into another region. (TODO: more detailed explanation.) + * and boolean functions \var{ascend_filter} and \var{descend_filter} + * on \var{WRegion} pairs (\var{to}, \var{from}), are used to decide when + * to descend or ascend into another region. */ EXTL_EXPORT WRegion *ioncore_navi_next(WRegion *reg, const char *dirstr, ExtlTab param) @@ -273,10 +273,8 @@ WRegion *ioncore_navi_first(WRegion *reg, const char *dirstr, ExtlTab param) { WRegionNaviData data; - if(reg==NULL){ - /* ??? */ + if(reg==NULL) return NULL; - } if(!get_param(&data, dirstr, param)) return NULL; @@ -290,11 +288,9 @@ WRegion *ioncore_navi_first(WRegion *reg, const char *dirstr, ExtlTab param) static WRegion *do_goto(WRegion *res) { - if(res!=NULL){ - /* TODO: deep rqorder? */ - region_rqorder(res, REGION_ORDER_FRONT); + if(res!=NULL) region_goto(res); - } + return res; } diff --git a/ioncore/netwm.c b/ioncore/netwm.c index d7c466e..4f65cdf 100644 --- a/ioncore/netwm.c +++ b/ioncore/netwm.c @@ -22,6 +22,7 @@ #include "focus.h" #include "xwindow.h" #include "extlconv.h" +#include "group.h" /*{{{ Atoms */ @@ -73,8 +74,8 @@ void netwm_init_rootwin(WRootWin *rw) XChangeProperty(ioncore_g.dpy, WROOTWIN_ROOT(rw), atom_net_supported, XA_ATOM, 32, PropModeReplace, (uchar*)atoms, N_NETWM); - /* Something else should probably be used as WM name here. */ - p[0]=prog_execname(); + + p[0]=libtu_progbasename(); xwindow_set_text_property(rw->dummy_win, atom_net_wm_name, p, 1); } @@ -85,7 +86,7 @@ void netwm_init_rootwin(WRootWin *rw) /*{{{ _NET_WM_STATE */ -int netwm_check_initial_fullscreen(WClientWin *cwin, bool sw) +WScreen *netwm_check_initial_fullscreen(WClientWin *cwin) { int i, n; @@ -96,18 +97,16 @@ int netwm_check_initial_fullscreen(WClientWin *cwin, bool sw) 1, TRUE, (uchar**)&data); if(n<0) - return -1; + return NULL; for(i=0; idata.l[0]==_NET_WM_STATE_ADD || ev->data.l[0]==_NET_WM_STATE_TOGGLE){ + WRegion *grp=region_groupleader_of((WRegion*)cwin); bool sw=clientwin_fullscreen_may_switchto(cwin); cwin->flags|=CLIENTWIN_FS_RQ; - if(!region_enter_fullscreen((WRegion*)cwin, sw)) + if(!region_enter_fullscreen(grp, sw)) cwin->flags&=~CLIENTWIN_FS_RQ; }else{ /* Should not be set.. */ @@ -156,9 +156,10 @@ static void netwm_state_change_rq(WClientWin *cwin, }else{ if(ev->data.l[0]==_NET_WM_STATE_REMOVE || ev->data.l[0]==_NET_WM_STATE_TOGGLE){ + WRegion *grp=region_groupleader_of((WRegion*)cwin); bool sw=clientwin_fullscreen_may_switchto(cwin); cwin->flags&=~CLIENTWIN_FS_RQ; - region_leave_fullscreen((WRegion*)cwin, sw); + region_leave_fullscreen(grp, sw); }else{ /* Set the flag */ cwin->flags|=CLIENTWIN_FS_RQ; diff --git a/ioncore/netwm.h b/ioncore/netwm.h index e566ca6..312f96b 100644 --- a/ioncore/netwm.h +++ b/ioncore/netwm.h @@ -14,6 +14,7 @@ #include "common.h" #include "rootwin.h" +#include "screen.h" #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ #define _NET_WM_STATE_ADD 1 /* add/set property */ @@ -22,7 +23,7 @@ extern void netwm_init(); extern void netwm_init_rootwin(WRootWin *rw); -extern int netwm_check_initial_fullscreen(WClientWin *cwin, bool switchto); +extern WScreen *netwm_check_initial_fullscreen(WClientWin *cwin); extern void netwm_update_state(WClientWin *cwin); extern void netwm_delete_state(WClientWin *cwin); extern void netwm_set_active(WRegion *reg); diff --git a/ioncore/pholder.c b/ioncore/pholder.c index 5fdb7b8..018de2b 100644 --- a/ioncore/pholder.c +++ b/ioncore/pholder.c @@ -40,18 +40,6 @@ WRegion *pholder_do_attach(WPHolder *ph, int flags, } -static WRegion *add_fn_reparent(WWindow *par, const WFitParams *fp, - WRegion *reg) -{ - if(!region_fitrep(reg, par, fp)){ - warn(TR("Unable to reparent.")); - return NULL; - } - region_detach_manager(reg); - return reg; -} - - WRegion *pholder_attach_(WPHolder *ph, int flags, WRegionAttachData *data) { WPHolder *root=pholder_root(ph); @@ -111,10 +99,9 @@ static bool pholder_do_check_reparent_default(WPHolder *ph, WRegion *reg) { WRegion *target=pholder_do_target(ph); - if(target==NULL) - return FALSE; - else - return region_attach_reparent_check(target, reg); + return (target==NULL + ? FALSE + : region_ancestor_check(target, reg)); } diff --git a/ioncore/pointer.c b/ioncore/pointer.c index 671af84..f1dc9e7 100644 --- a/ioncore/pointer.c +++ b/ioncore/pointer.c @@ -137,7 +137,8 @@ static void call_button(WBinding *binding, XButtonEvent *ev) return; p_curr_event=(XEvent*)ev; - extl_call(binding->func, "oo", NULL, p_reg, p_subreg); + extl_call(binding->func, "ooo", NULL, p_reg, p_subreg, + (p_reg!=NULL ? p_reg->active_sub : NULL)); p_curr_event=NULL; } diff --git a/ioncore/region.c b/ioncore/region.c index 68be25d..10f7c28 100644 --- a/ioncore/region.c +++ b/ioncore/region.c @@ -152,12 +152,14 @@ void region_updategr(WRegion *reg) void region_map(WRegion *reg) { CALL_DYN(region_map, reg, (reg)); + region_notify_change_(reg, ioncore_g.notifies.map); } void region_unmap(WRegion *reg) { CALL_DYN(region_unmap, reg, (reg)); + region_notify_change_(reg, ioncore_g.notifies.unmap); } @@ -280,14 +282,11 @@ void region_updategr_default(WRegion *reg) bool region_prepare_focus(WRegion *reg, int flags, WPrepareFocusResult *res) { - WRegion *mgr=REGION_MANAGER(reg); - WRegion *par=REGION_PARENT_REG(reg); - if(REGION_IS_MAPPED(reg) && region_may_control_focus(reg)){ - res->reg=reg; - res->flags=0; - return TRUE; - }else{ + if(!REGION_IS_ACTIVE(reg) || !REGION_IS_MAPPED(reg)){ + WRegion *mgr=REGION_MANAGER(reg); + WRegion *par=REGION_PARENT_REG(reg); + if(mgr!=NULL){ return region_managed_prepare_focus(mgr, reg, flags, res); }else if(par!=NULL){ @@ -296,11 +295,14 @@ bool region_prepare_focus(WRegion *reg, int flags, /* Just focus reg, if it has no manager, and parent can be * focused. */ + }else if(!REGION_IS_MAPPED(reg)){ + region_map(reg); } - res->reg=reg; - res->flags=flags; - return TRUE; } + + res->reg=reg; + res->flags=flags; + return TRUE; } @@ -366,32 +368,10 @@ bool region_reparent(WRegion *reg, WWindow *par, /*{{{ Close */ -static bool region_rqclose_default(WRegion *reg, bool relocate) +static void region_rqclose_default(WRegion *reg, bool relocate) { - WPHolder *ph; - bool refuse=TRUE, mcf; - - if((!relocate && !region_may_destroy(reg)) || - !region_manager_allows_destroying(reg)){ - return FALSE; - } - - ph=region_get_rescue_pholder(reg); - mcf=region_may_control_focus(reg); - - if(ph!=NULL){ - refuse=!region_rescue_clientwins(reg, ph); - destroy_obj((Obj*)ph); - } - - if(refuse){ - warn(TR("Failed to rescue some client windows - not closing.")); - return FALSE; - } - - region_dispose(reg, mcf); - - return TRUE; + if(relocate || region_may_dispose(reg)) + region_defer_rqdispose(reg); } @@ -400,19 +380,16 @@ static bool region_rqclose_default(WRegion *reg, bool relocate) * depends on whether the particular type of region in question has * implemented the feature and, in case of client windows, whether * the client supports the \code{WM_DELETE} protocol (see also - * \fnref{WClientWin.kill}). If the operation is likely to succeed, - * \code{true} is returned, otherwise \code{false}. In most cases the - * region will not have been actually destroyed when this function returns. - * If \var{relocate} is not set, and \var{reg} manages other regions, it - * will not be closed. Otherwise the managed regions will be attempted - * to be relocated. + * \fnref{WClientWin.kill}). The region will not be destroyed when + * this function returns. To find out if and when it is destroyed, + * use the "deinit" notification. If \var{relocate} is not set, and + * \var{reg} manages other regions, it will not be closed. Otherwise + * the managed regions will be attempted to be relocated. */ EXTL_EXPORT_MEMBER -bool region_rqclose(WRegion *reg, bool relocate) +void region_rqclose(WRegion *reg, bool relocate) { - bool ret=FALSE; - CALL_DYN_RET(ret, bool, region_rqclose, reg, (reg, relocate)); - return ret; + CALL_DYN(region_rqclose, reg, (reg, relocate)); } @@ -421,9 +398,13 @@ static WRegion *region_rqclose_propagate_default(WRegion *reg, { if(maybe_sub==NULL) maybe_sub=region_current(reg); - if(maybe_sub!=NULL) + + if(maybe_sub!=NULL){ return region_rqclose_propagate(maybe_sub, NULL); - return (region_rqclose(reg, FALSE) ? reg : NULL); + }else{ + region_rqclose(reg, FALSE); + return reg; + } } @@ -431,8 +412,8 @@ static WRegion *region_rqclose_propagate_default(WRegion *reg, * Recursively attempt to close a region or one of the regions managed by * it. If \var{sub} is set, it will be used as the managed region, otherwise * \fnref{WRegion.current}\code{(reg)}. The object to be closed is - * returned or NULL if nothing can be closed. Also see notes for - * \fnref{WRegion.rqclose}. + * returned, or NULL if nothing can be closed. For further details, see + * notes for \fnref{WRegion.rqclose}. */ EXTL_EXPORT_MEMBER WRegion *region_rqclose_propagate(WRegion *reg, WRegion *maybe_sub) @@ -444,48 +425,104 @@ WRegion *region_rqclose_propagate(WRegion *reg, WRegion *maybe_sub) } -bool region_may_destroy(WRegion *reg) +bool region_may_dispose_default(WRegion *reg) +{ + bool res=region_rescue_needed(reg); + + if(res){ + const char *name=region_name(reg); + warn(TR("Can not destroy %s: contains client windows."), + (name!=NULL ? name : TR("(unknown)"))); + } + + return !res; +} + + +bool region_may_dispose(WRegion *reg) { bool ret=TRUE; - CALL_DYN_RET(ret, bool, region_may_destroy, reg, (reg)); + CALL_DYN_RET(ret, bool, region_may_dispose, reg, (reg)); return ret; } -bool region_managed_may_destroy(WRegion *mgr, WRegion *reg) +static WRegion *region_managed_disposeroot_default(WRegion *mgr, WRegion *reg) { - bool ret=TRUE; - CALL_DYN_RET(ret, bool, region_managed_may_destroy, mgr, (mgr, reg)); + return reg; +} + + +WRegion *region_managed_disposeroot(WRegion *mgr, WRegion *reg) +{ + WRegion *ret=NULL; + CALL_DYN_RET(ret, WRegion*, region_managed_disposeroot, mgr, (mgr, reg)); return ret; } -bool region_manager_allows_destroying(WRegion *reg) +WRegion *region_disposeroot(WRegion *reg) { WRegion *mgr=REGION_MANAGER(reg); - if(mgr==NULL) - return TRUE; + return (mgr!=NULL + ? region_managed_disposeroot(mgr, reg) + : reg); +} + + +bool region_rqdispose(WRegion *reg) +{ + WRegion *root; + + if(!region_may_dispose(reg)) + return FALSE; + + root=region_disposeroot(reg); - return region_managed_may_destroy(mgr, reg); + if(root==NULL) + return FALSE; + + return region_dispose(root); } -void region_dispose(WRegion *reg, bool was_mcf) +bool region_dispose_(WRegion *reg, bool not_simple) { - if(was_mcf){ - WPHolder *ph=region_get_return(reg); - if(ph!=NULL) - pholder_goto(ph); + bool rescue=not_simple; + bool was_mcf=(not_simple && region_may_control_focus(reg)); + WPHolder *ph=NULL; + + if(rescue){ + if(!region_rescue(reg, NULL)){ + warn(TR("Failed to rescue some client windows - not closing.")); + return FALSE; + } + } + + if(was_mcf) + ph=region_unset_get_return(reg); + + destroy_obj((Obj*)reg); + + if(ph!=NULL){ + pholder_goto(ph); + destroy_obj((Obj*)ph); } + + return TRUE; +} - mainloop_defer_destroy((Obj*)reg); + +bool region_dispose(WRegion *reg) +{ + return region_dispose_(reg, TRUE); } -void region_dispose_(WRegion *reg) +void region_defer_rqdispose(WRegion *reg) { - region_dispose(reg, region_may_control_focus(reg)); + mainloop_defer_action((Obj*)reg, (WDeferredAction*)region_rqdispose); } @@ -498,29 +535,11 @@ void region_dispose_(WRegion *reg) /* Routine to call to unmanage a region */ void region_detach_manager(WRegion *reg) { - WRegion *mgr; - - mgr=REGION_MANAGER(reg); + WRegion *mgr=REGION_MANAGER(reg); if(mgr==NULL) return; -#if 0 - /* Restore activity state to non-parent manager */ - if(region_may_control_focus(reg)){ - WRegion *par=REGION_PARENT_REG(reg); - if(par!=NULL && mgr!=par && REGION_PARENT_REG(mgr)==par){ - /* REGION_ACTIVE shouldn't be set for windowless regions - * but make the parent's active_sub point to it - * nevertheless so that region_may_control_focus can - * be made to work. - */ - par->active_sub=mgr; - region_maybewarp_now(mgr, FALSE); - } - } -#endif - region_set_activity(reg, SETPARAM_UNSET); region_managed_remove(mgr, reg); @@ -929,6 +948,9 @@ static DynFunTab region_dynfuntab[]={ {(DynFun*)region_rescue_clientwins, (DynFun*)region_rescue_child_clientwins}, + + {(DynFun*)region_may_dispose, + (DynFun*)region_may_dispose_default}, {(DynFun*)region_prepare_manage, (DynFun*)region_prepare_manage_default}, @@ -938,6 +960,9 @@ static DynFunTab region_dynfuntab[]={ {(DynFun*)region_managed_prepare_focus, (DynFun*)region_managed_prepare_focus_default}, + + {(DynFun*)region_managed_disposeroot, + (DynFun*)region_managed_disposeroot_default}, {(DynFun*)region_rqclose_propagate, (DynFun*)region_rqclose_propagate_default}, diff --git a/ioncore/region.h b/ioncore/region.h index d30b435..33baf48 100644 --- a/ioncore/region.h +++ b/ioncore/region.h @@ -131,17 +131,17 @@ DYNFUN Window region_xwindow(const WRegion *reg); DYNFUN void region_activated(WRegion *reg); DYNFUN void region_inactivated(WRegion *reg); DYNFUN void region_updategr(WRegion *reg); -DYNFUN bool region_rqclose(WRegion *reg, bool relocate); +DYNFUN void region_rqclose(WRegion *reg, bool relocate); DYNFUN WRegion *region_rqclose_propagate(WRegion *reg, WRegion *maybe_sub); DYNFUN WRegion *region_current(WRegion *mgr); DYNFUN void region_notify_rootpos(WRegion *reg, int x, int y); -DYNFUN bool region_may_destroy(WRegion *reg); +DYNFUN bool region_may_dispose(WRegion *reg); DYNFUN WRegion *region_managed_control_focus(WRegion *mgr, WRegion *reg); DYNFUN void region_managed_remove(WRegion *reg, WRegion *sub); DYNFUN bool region_managed_prepare_focus(WRegion *reg, WRegion *sub, int flags, WPrepareFocusResult *res); DYNFUN void region_managed_notify(WRegion *reg, WRegion *sub, WRegionNotify how); -DYNFUN bool region_managed_may_destroy(WRegion *mgr, WRegion *reg); +DYNFUN WRegion *region_managed_disposeroot(WRegion *mgr, WRegion *reg); DYNFUN bool region_managed_rqorder(WRegion *reg, WRegion *sub, WRegionOrder order); @@ -174,8 +174,11 @@ extern bool region_is_fully_mapped(WRegion *reg); extern void region_detach_manager(WRegion *reg); -extern void region_dispose(WRegion *reg, bool was_mcf); -extern void region_dispose_(WRegion *reg); +extern WRegion *region_disposeroot(WRegion *reg); + +extern bool region_dispose(WRegion *reg); +extern bool region_rqdispose(WRegion *reg); +extern void region_defer_rqdispose(WRegion *reg); extern WWindow *region_parent(WRegion *reg); extern WRegion *region_manager(WRegion *reg); @@ -190,8 +193,6 @@ extern Window region_root_of(const WRegion *reg); extern WScreen *region_screen_of(WRegion *reg); extern bool region_same_rootwin(const WRegion *reg1, const WRegion *reg2); -extern bool region_manager_allows_destroying(WRegion *reg); - extern WRegion *region_managed_within(WRegion *reg, WRegion *mgd); extern void region_set_manager_pseudoactivity(WRegion *reg); diff --git a/ioncore/resize.c b/ioncore/resize.c index 33bfde0..ec94cda 100644 --- a/ioncore/resize.c +++ b/ioncore/resize.c @@ -317,6 +317,33 @@ WMoveresMode *region_begin_move(WRegion *reg, WDrawRubberbandFn *rubfn, } +static void moveresmode_setorig(WMoveresMode *mode) +{ + mode->dx1=0; + mode->dx2=0; + mode->dy1=0; + mode->dy2=0; + mode->origgeom=mode->geom; +} + + +static void moveresmode_do_newgeom(WMoveresMode *mode, WRQGeomParams *rq) +{ + if(XOR_RESIZE) + moveres_draw_rubberband(mode); + + if(mode->reg!=NULL){ + rq->flags|=mode->rqflags; + region_rqgeom(mode->reg, rq, &mode->geom); + } + + moveres_draw_infowin(mode); + + if(XOR_RESIZE) + moveres_draw_rubberband(mode); +} + + static void moveresmode_delta(WMoveresMode *mode, int dx1, int dx2, int dy1, int dy2, WRectangle *rret) @@ -387,26 +414,10 @@ static void moveresmode_delta(WMoveresMode *mode, rq.geom.y+=mode->origgeom.h-rq.geom.h; } - if(XOR_RESIZE) - moveres_draw_rubberband(mode); + moveresmode_do_newgeom(mode, &rq); - if(mode->reg!=NULL){ - rq.flags=mode->rqflags; - region_rqgeom(mode->reg, &rq, &mode->geom); - } - - if(!mode->resize_cumulative){ - mode->dx1=0; - mode->dx2=0; - mode->dy1=0; - mode->dy2=0; - mode->origgeom=mode->geom; - } - - moveres_draw_infowin(mode); - - if(XOR_RESIZE) - moveres_draw_rubberband(mode); + if(!mode->resize_cumulative) + moveresmode_setorig(mode); if(rret!=NULL) *rret=mode->geom; @@ -430,6 +441,15 @@ void moveresmode_delta_move(WMoveresMode *mode, } +void moveresmode_rqgeom(WMoveresMode *mode, WRQGeomParams *rq, + WRectangle *rret) +{ + mode->mode=MOVERES_SIZE; + moveresmode_do_newgeom(mode, rq); + moveresmode_setorig(mode); +} + + /* It is ugly to do this here, but it will have to do for now... */ static void set_saved(WMoveresMode *mode, WRegion *reg) { @@ -478,7 +498,7 @@ bool moveresmode_do_end(WMoveresMode *mode, bool apply) set_saved(mode, reg); if(mode->infowin!=NULL){ - region_dispose((WRegion*)mode->infowin, FALSE); + mainloop_defer_destroy((Obj*)mode->infowin); mode->infowin=NULL; } destroy_obj((Obj*)mode); @@ -520,6 +540,26 @@ void region_rqgeom(WRegion *reg, const WRQGeomParams *rq, } +void rqgeomparams_from_table(WRQGeomParams *rq, + const WRectangle *origg, ExtlTab g) +{ + rq->geom=*origg; + rq->flags=REGION_RQGEOM_WEAK_ALL; + + if(extl_table_gets_i(g, "x", &(rq->geom.x))) + rq->flags&=~REGION_RQGEOM_WEAK_X; + if(extl_table_gets_i(g, "y", &(rq->geom.y))) + rq->flags&=~REGION_RQGEOM_WEAK_Y; + if(extl_table_gets_i(g, "w", &(rq->geom.w))) + rq->flags&=~REGION_RQGEOM_WEAK_W; + if(extl_table_gets_i(g, "h", &(rq->geom.h))) + rq->flags&=~REGION_RQGEOM_WEAK_H; + + rq->geom.w=maxof(1, rq->geom.w); + rq->geom.h=maxof(1, rq->geom.h); +} + + /*EXTL_DOC * Attempt to resize and/or move \var{reg}. The table \var{g} is a usual * geometry specification (fields \var{x}, \var{y}, \var{w} and \var{h}), @@ -529,29 +569,14 @@ void region_rqgeom(WRegion *reg, const WRQGeomParams *rq, EXTL_EXPORT_AS(WRegion, rqgeom) ExtlTab region_rqgeom_extl(WRegion *reg, ExtlTab g) { - WRectangle ogeom=REGION_GEOM(reg); WRQGeomParams rq=RQGEOMPARAMS_INIT; + WRectangle res; + rqgeomparams_from_table(&rq, ®ION_GEOM(reg), g); - rq.geom=ogeom; - rq.flags=REGION_RQGEOM_WEAK_ALL; - - - if(extl_table_gets_i(g, "x", &(rq.geom.x))) - rq.flags&=~REGION_RQGEOM_WEAK_X; - if(extl_table_gets_i(g, "y", &(rq.geom.y))) - rq.flags&=~REGION_RQGEOM_WEAK_Y; - if(extl_table_gets_i(g, "w", &(rq.geom.w))) - rq.flags&=~REGION_RQGEOM_WEAK_W; - if(extl_table_gets_i(g, "h", &(rq.geom.h))) - rq.flags&=~REGION_RQGEOM_WEAK_H; - - rq.geom.w=maxof(1, rq.geom.w); - rq.geom.h=maxof(1, rq.geom.h); - - region_rqgeom(reg, &rq, &ogeom); + region_rqgeom(reg, &rq, &res); - return extl_table_from_rectangle(&ogeom); + return extl_table_from_rectangle(&res); } diff --git a/ioncore/resize.h b/ioncore/resize.h index 700c56e..c56b964 100644 --- a/ioncore/resize.h +++ b/ioncore/resize.h @@ -93,6 +93,8 @@ extern void moveresmode_delta_resize(WMoveresMode *mode, WRectangle *rret); extern void moveresmode_delta_move(WMoveresMode *mode, int dx, int dy, WRectangle *rret); +extern void moveresmode_rqgeom(WMoveresMode *mode, WRQGeomParams *rq, + WRectangle *rret); extern bool moveresmode_do_end(WMoveresMode *mode, bool apply); extern WRegion *moveresmode_target(WMoveresMode *mode); @@ -147,4 +149,7 @@ extern void region_absolute_geom_to_parent(WRegion *reg, const WRectangle *rgeom, WRectangle *pgeom); +extern void rqgeomparams_from_table(WRQGeomParams *rq, + const WRectangle *origg, ExtlTab g); + #endif /* ION_IONCORE_RESIZE_H */ diff --git a/ioncore/rootwin.c b/ioncore/rootwin.c index 6e75ee3..a1db720 100644 --- a/ioncore/rootwin.c +++ b/ioncore/rootwin.c @@ -252,12 +252,7 @@ static bool rootwin_init(WRootWin *rootwin, int xscr) net_virtual_roots=XInternAtom(ioncore_g.dpy, "_NET_VIRTUAL_ROOTS", False); XDeleteProperty(ioncore_g.dpy, root, net_virtual_roots); - /* */ { - /* TODO: typed LINK_ITEM */ - WRegion *tmp=(WRegion*)ioncore_g.rootwins; - LINK_ITEM(tmp, (WRegion*)rootwin, p_next, p_prev); - ioncore_g.rootwins=(WRootWin*)tmp; - } + LINK_ITEM(*(WRegion**)&ioncore_g.rootwins, (WRegion*)rootwin, p_next, p_prev); xwindow_set_cursor(root, IONCORE_CURSOR_DEFAULT); @@ -280,11 +275,7 @@ void rootwin_deinit(WRootWin *rw) destroy_obj((Obj*)scr); } - /* */ { - WRegion *tmp=(WRegion*)ioncore_g.rootwins; - UNLINK_ITEM(tmp, (WRegion*)rw, p_next, p_prev); - ioncore_g.rootwins=(WRootWin*)tmp; - } + UNLINK_ITEM(*(WRegion**)&ioncore_g.rootwins, (WRegion*)rw, p_next, p_prev); XSelectInput(ioncore_g.dpy, WROOTWIN_ROOT(rw), 0); diff --git a/ioncore/saveload.c b/ioncore/saveload.c index bb67ac1..b179ccf 100644 --- a/ioncore/saveload.c +++ b/ioncore/saveload.c @@ -86,33 +86,6 @@ WRegion *create_region_load(WWindow *par, const WFitParams *fp, if(!extl_table_gets_s(tab, "type", &objclass)) return NULL; - - /* Backwards compatibility hack. */ - if(strcmp(objclass, "WFloatWS")==0){ - objclass=scopy("WGroupWS"); - }else if(strcmp(objclass, "WIonWS")==0){ - WGroupWS *ws=create_groupws(par, fp); - if(ws!=NULL){ - extl_table_gets_s(tab, "name", &name); - extl_table_sets_s(tab, "type", "WTiling"); - extl_table_sets_b(tab, "bottom", TRUE); - extl_table_sets_b(tab, "bottom_last_close", TRUE); - extl_table_sets_i(tab, "sizepolicy", SIZEPOLICY_FULL_EXACT); - - if(name!=NULL) - region_set_name((WRegion*)ws, name); - - reg=group_attach_new((WGroup*)ws, tab); - - if(reg!=NULL) - return (WRegion*)ws; - - destroy_obj((Obj*)ws); - } - objclass=scopy("WTiling"); - }else if(strcmp(objclass, "WFloatFrame")==0){ - objclass=scopy("WFrame"); - } if(objclass==NULL) return NULL; @@ -187,10 +160,34 @@ ExtlTab region_get_base_configuration(WRegion *reg) } +static bool get_config_clientwins=TRUE; + + ExtlTab region_get_configuration(WRegion *reg) { ExtlTab tab=extl_table_none(); - CALL_DYN_RET(tab, ExtlTab, region_get_configuration, reg, (reg)); + if(get_config_clientwins || !OBJ_IS(reg, WClientWin)){ + CALL_DYN_RET(tab, ExtlTab, region_get_configuration, reg, (reg)); + } + return tab; +} + + +/*EXTL_DOC + * Get configuration tree. If \var{clientwins} is unset, client windows + * are filtered out. + */ +EXTL_EXPORT_AS(WRegion, get_configuration) +ExtlTab region_get_configuration_extl(WRegion *reg, bool clientwins) +{ + ExtlTab tab; + + get_config_clientwins=clientwins; + + tab=region_get_configuration(reg); + + get_config_clientwins=TRUE; + return tab; } diff --git a/ioncore/screen-notify.c b/ioncore/screen-notify.c new file mode 100644 index 0000000..e65208a --- /dev/null +++ b/ioncore/screen-notify.c @@ -0,0 +1,390 @@ +/* + * ion/ioncore/screen-notify.c + * + * Copyright (c) Tuomo Valkonen 1999-2007. + * + * Ion is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + */ + +#include + +#include +#include + +#include "common.h" +#include "global.h" +#include "infowin.h" +#include "activity.h" +#include "tags.h" +#include "gr.h" +#include "gr-util.h" +#include "stacking.h" +#include "names.h" +#include "screen.h" +#include "screen-notify.h" +#include "strings.h" + + +/*{{{ Generic stuff */ + + +static WInfoWin *do_get_notifywin(WScreen *scr, Watch *watch, uint pos, + char *style) +{ + + WInfoWin *iw=(WInfoWin*)(watch->obj); + WFitParams fp; + + if(iw==NULL){ + WMPlexAttachParams param=MPLEXATTACHPARAMS_INIT; + + param.flags=(MPLEX_ATTACH_UNNUMBERED| + MPLEX_ATTACH_SIZEPOLICY| + MPLEX_ATTACH_GEOM| + MPLEX_ATTACH_LEVEL); + param.level=STACKING_LEVEL_ON_TOP; + + param.geom.x=0; + param.geom.y=0; + param.geom.w=1; + param.geom.h=1; + + switch(pos){ + case MPLEX_STDISP_TL: + param.szplcy=SIZEPOLICY_GRAVITY_NORTHWEST; + param.geom.x=0; + break; + + case MPLEX_STDISP_TR: + param.szplcy=SIZEPOLICY_GRAVITY_NORTHEAST; + param.geom.x=REGION_GEOM(scr).w-1; + break; + + case MPLEX_STDISP_BL: + param.szplcy=SIZEPOLICY_GRAVITY_SOUTHWEST; + param.geom.x=0; + param.geom.y=REGION_GEOM(scr).h-1; + break; + + case MPLEX_STDISP_BR: + param.szplcy=SIZEPOLICY_GRAVITY_SOUTHEAST; + param.geom.x=REGION_GEOM(scr).w-1; + param.geom.y=REGION_GEOM(scr).h-1; + break; + } + + + iw=(WInfoWin*)mplex_do_attach_new(&scr->mplex, ¶m, + (WRegionCreateFn*)create_infowin, + style); + + if(iw!=NULL) + watch_setup(watch, (Obj*)iw, NULL); + } + + return iw; +} + + +static void do_unnotify(Watch *watch) +{ + Obj *iw=watch->obj; + if(iw!=NULL){ + watch_reset(watch); + mainloop_defer_destroy((Obj*)iw); + } +} + + +/*}}}*/ + + +/*{{{ Notifywin */ + + +static WInfoWin *get_notifywin(WScreen *scr) +{ + WRegion *stdisp=NULL; + WMPlexSTDispInfo info; + uint pos=MPLEX_STDISP_TL; + + mplex_get_stdisp(&scr->mplex, &stdisp, &info); + if(stdisp!=NULL) + pos=info.pos; + + return do_get_notifywin(scr, &scr->notifywin_watch, pos, "actnotify"); +} + + +void screen_notify(WScreen *scr, const char *str) +{ + WInfoWin *iw=get_notifywin(scr); + + if(iw!=NULL){ + int maxw=REGION_GEOM(scr).w/3; + infowin_set_text(iw, str, maxw); + } +} + + +void screen_unnotify(WScreen *scr) +{ + do_unnotify(&scr->notifywin_watch); +} + + +static bool ws_mapped(WScreen *scr, WRegion *reg) +{ + while(1){ + WRegion *mgr=REGION_MANAGER(reg); + + if(mgr==NULL) + return FALSE; + + if(mgr==(WRegion*)scr) + return REGION_IS_MAPPED(reg); + + reg=mgr; + } +} + + +static void screen_managed_activity(WScreen *scr) +{ + char *notstr=NULL; + WRegion *reg; + ObjListIterTmp tmp; + PtrListIterTmp tmp2; + ObjList *actlist=ioncore_activity_list(); + WInfoWin *iw=NULL; + PtrList *found=NULL; + int nfound=0, nadded=0; + int w=0, maxw=REGION_GEOM(scr).w/4; + + /* Lisäksi minimipituus (10ex tms.), ja sen yli menevät jätetään + * pois (+ n) + */ + FOR_ALL_ON_OBJLIST(WRegion*, reg, actlist, tmp){ + if(region_screen_of(reg)!=scr || ws_mapped(scr, reg)) + continue; + if(region_name(reg)==NULL) + continue; + if(ptrlist_insert_last(&found, reg)) + nfound++; + } + + if(found==NULL) + goto unnotify; + + iw=get_notifywin(scr); + + if(iw==NULL) + return; + + if(iw->brush==NULL) + goto unnotify; + + notstr=scopy(TR("act: ")); + + if(notstr==NULL) + goto unnotify; + + FOR_ALL_ON_PTRLIST(WRegion*, reg, found, tmp2){ + const char *nm=region_name(reg); + char *nstr=NULL, *label=NULL; + + w=grbrush_get_text_width(iw->brush, notstr, strlen(notstr)); + + if(w>=maxw) + break; + + label=grbrush_make_label(iw->brush, nm, maxw-w); + if(label!=NULL){ + nstr=(nadded>0 + ? scat3(notstr, ", ", label) + : scat(notstr, label)); + + if(nstr!=NULL){ + free(notstr); + notstr=nstr; + nadded++; + } + free(label); + } + } + + if(nfound > nadded){ + char *nstr=NULL; + + libtu_asprintf(&nstr, "%s +%d", notstr, nfound-nadded); + + if(nstr!=NULL){ + free(notstr); + notstr=nstr; + } + } + + ptrlist_clear(&found); + + infowin_set_text(iw, notstr, 0); + + free(notstr); + + return; + +unnotify: + screen_unnotify(scr); +} + + +static void screen_do_update_notifywin(WScreen *scr) +{ + if(ioncore_g.screen_notify) + screen_managed_activity(scr); + else + screen_unnotify(scr); +} + + +/*}}}*/ + + +/*{{{ Infowin */ + + +static WInfoWin *get_infowin(WScreen *scr) +{ + WRegion *stdisp=NULL; + WMPlexSTDispInfo info; + uint pos=MPLEX_STDISP_TR; + + mplex_get_stdisp(&scr->mplex, &stdisp, &info); + if(stdisp!=NULL && info.pos==MPLEX_STDISP_TR) + pos=MPLEX_STDISP_BR; + + return do_get_notifywin(scr, &scr->infowin_watch, pos, "tab-info"); +} + + +void screen_windowinfo(WScreen *scr, const char *str) +{ + WInfoWin *iw=get_infowin(scr); + + if(iw!=NULL){ + int maxw=REGION_GEOM(scr).w/3; + infowin_set_text(iw, str, maxw); + } +} + + +void screen_nowindowinfo(WScreen *scr) +{ + do_unnotify(&scr->infowin_watch); +} + + +GR_DEFATTR(active); +GR_DEFATTR(inactive); +GR_DEFATTR(selected); +GR_DEFATTR(tagged); +GR_DEFATTR(not_tagged); +GR_DEFATTR(not_dragged); +GR_DEFATTR(activity); +GR_DEFATTR(no_activity); + + +static void init_attr() +{ + GR_ALLOCATTR_BEGIN; + GR_ALLOCATTR(active); + GR_ALLOCATTR(inactive); + GR_ALLOCATTR(selected); + GR_ALLOCATTR(tagged); + GR_ALLOCATTR(not_tagged); + GR_ALLOCATTR(not_dragged); + GR_ALLOCATTR(no_activity); + GR_ALLOCATTR(activity); + GR_ALLOCATTR_END; +} + + +static void screen_do_update_infowin(WScreen *scr) +{ + WRegion *reg=mplex_mx_current(&(scr->mplex)); + bool tag=(reg!=NULL && region_is_tagged(reg)); + bool act=(reg!=NULL && region_is_activity_r(reg) && !REGION_IS_ACTIVE(scr)); + bool sac=REGION_IS_ACTIVE(scr); + + if(tag || act){ + const char *n=region_displayname(reg); + WInfoWin *iw; + + screen_windowinfo(scr, n); + + iw=(WInfoWin*)scr->infowin_watch.obj; + + if(iw!=NULL){ + GrStyleSpec *spec=infowin_stylespec(iw); + + init_attr(); + + gr_stylespec_unalloc(spec); + + gr_stylespec_set(spec, GR_ATTR(selected)); + gr_stylespec_set(spec, GR_ATTR(not_dragged)); + gr_stylespec_set(spec, sac ? GR_ATTR(active) : GR_ATTR(inactive)); + gr_stylespec_set(spec, tag ? GR_ATTR(tagged) : GR_ATTR(not_tagged)); + gr_stylespec_set(spec, act ? GR_ATTR(activity) : GR_ATTR(no_activity)); + } + + }else{ + screen_nowindowinfo(scr); + } +} + + + +/*}}}*/ + + +/*{{{ Notification callbacks and deferred updates*/ + + +void screen_update_infowin(WScreen *scr) +{ + mainloop_defer_action((Obj*)scr, + (WDeferredAction*)screen_do_update_infowin); +} + + +void screen_update_notifywin(WScreen *scr) +{ + mainloop_defer_action((Obj*)scr, + (WDeferredAction*)screen_do_update_notifywin); +} + + +void screen_managed_notify(WScreen *scr, WRegion *reg, WRegionNotify how) +{ + if(how==ioncore_g.notifies.tag) + screen_update_infowin(scr); +} + + +void ioncore_screen_activity_notify(WRegion *reg, WRegionNotify how) +{ + if(how==ioncore_g.notifies.activity){ + WScreen *scr=region_screen_of(reg); + + screen_update_infowin(scr); + screen_update_notifywin(scr); + + } +} + + +/*}}}*/ + diff --git a/ioncore/screen-notify.h b/ioncore/screen-notify.h new file mode 100644 index 0000000..d5f27cd --- /dev/null +++ b/ioncore/screen-notify.h @@ -0,0 +1,27 @@ +/* + * ion/ioncore/screen-notify.h + * + * Copyright (c) Tuomo Valkonen 1999-2007. + * + * Ion is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + */ + +#ifndef ION_IONCORE_SCREEN_NOTIFY_H +#define ION_IONCORE_SCREEN_NOTIFY_H + +#include "common.h" +#include "region.h" +#include "screen.h" + + +void screen_managed_notify(WScreen *scr, WRegion *reg, WRegionNotify how); + +void screen_update_infowin(WScreen *scr); +void screen_update_notifywin(WScreen *scr); + +extern void ioncore_screen_activity_notify(WRegion *reg, WRegionNotify how); + +#endif /* ION_IONCORE_SCREEN_NOTIFY_H */ diff --git a/ioncore/screen.c b/ioncore/screen.c index cac75a0..00d675f 100644 --- a/ioncore/screen.c +++ b/ioncore/screen.c @@ -13,7 +13,6 @@ #include #include -#include #include "common.h" #include "global.h" @@ -32,25 +31,18 @@ #include "regbind.h" #include "frame-pointer.h" #include "rectangle.h" -#include "infowin.h" -#include "activity.h" #include "extlconv.h" #include "llist.h" #include "group-ws.h" #include "mplex.h" -#include "tags.h" -#include "gr.h" -#include "gr-util.h" #include "conf.h" +#include "activity.h" +#include "screen-notify.h" WHook *screen_managed_changed_hook=NULL; -static void screen_update_infowin(WScreen *scr); - - - /*{{{ Init/deinit */ @@ -70,7 +62,6 @@ bool screen_init(WScreen *scr, WRootWin *parent, scr->managed_off.h=0; scr->next_scr=NULL; scr->prev_scr=NULL; - scr->rotation=SCREEN_ROTATION_0; watch_init(&(scr->notifywin_watch)); watch_init(&(scr->infowin_watch)); @@ -224,6 +215,9 @@ static void screen_managed_changed(WScreen *scr, int mode, bool sw, n==NULL ? "" : n); } + if(region_is_activity_r((WRegion*)scr)) + screen_update_notifywin(scr); + screen_update_infowin(scr); mplex_call_changed_hook((WMPlex*)scr, @@ -262,218 +256,6 @@ void screen_activated(WScreen *scr) /*}}}*/ -/*}}}*/ - - -/*{{{ Notifications */ - - -static void do_notify(WScreen *scr, Watch *watch, bool right, - const char *str, char *style) -{ - - WInfoWin *iw=(WInfoWin*)(watch->obj); - WFitParams fp; - - if(iw==NULL){ - WMPlexAttachParams param=MPLEXATTACHPARAMS_INIT; - - param.flags=(MPLEX_ATTACH_UNNUMBERED| - MPLEX_ATTACH_SIZEPOLICY| - MPLEX_ATTACH_GEOM| - MPLEX_ATTACH_LEVEL); - param.level=STACKING_LEVEL_ON_TOP; - - if(!right){ - param.szplcy=SIZEPOLICY_GRAVITY_NORTHWEST; - param.geom.x=0; - }else{ - param.szplcy=SIZEPOLICY_GRAVITY_NORTHEAST; - param.geom.x=REGION_GEOM(scr).w-1; - } - - param.geom.y=0; - param.geom.w=1; - param.geom.h=1; - - iw=(WInfoWin*)mplex_do_attach_new(&scr->mplex, ¶m, - (WRegionCreateFn*)create_infowin, - style); - - if(iw==NULL) - return; - - watch_setup(watch, (Obj*)iw, NULL); - } - - infowin_set_text(iw, str); -} - - -void screen_notify(WScreen *scr, const char *str) -{ - do_notify(scr, &scr->notifywin_watch, FALSE, str, "actnotify"); -} - - -void screen_windowinfo(WScreen *scr, const char *str) -{ - do_notify(scr, &scr->infowin_watch, TRUE, str, "tab-info"); -} - - -void screen_unnotify(WScreen *scr) -{ - Obj *iw=scr->notifywin_watch.obj; - if(iw!=NULL){ - watch_reset(&(scr->notifywin_watch)); - region_dispose((WRegion*)iw, FALSE); - } -} - - -void screen_nowindowinfo(WScreen *scr) -{ - Obj *iw=scr->infowin_watch.obj; - if(iw!=NULL){ - watch_reset(&(scr->infowin_watch)); - region_dispose((WRegion*)iw, FALSE); - } -} - - -static char *addnot(char *str, WRegion *reg) -{ - const char *nm=region_name(reg); - char *nstr=NULL; - - if(nm==NULL) - return str; - - if(str==NULL) - return scat(TR("act: "), nm); - - nstr=scat3(str, ", ", nm); - if(nstr!=NULL) - free(str); - return nstr; -} - - -static char *screen_managed_activity(WScreen *scr) -{ - char *notstr=NULL; - WMPlexIterTmp tmp; - WRegion *reg; - - FOR_ALL_MANAGED_BY_MPLEX(&scr->mplex, reg, tmp){ - if(region_is_activity_r(reg) && !REGION_IS_MAPPED(reg)) - notstr=addnot(notstr, reg); - } - - return notstr; -} - - -static void screen_notify_activity(WScreen *scr) -{ - if(ioncore_g.screen_notify){ - char *notstr=screen_managed_activity(scr); - if(notstr!=NULL){ - screen_notify(scr, notstr); - free(notstr); - return; - } - } - - screen_unnotify(scr); - - screen_update_infowin(scr); -} - - -static void screen_notify_tag(WScreen *scr) -{ - screen_update_infowin(scr); -} - - -GR_DEFATTR(active); -GR_DEFATTR(inactive); -GR_DEFATTR(selected); -GR_DEFATTR(tagged); -GR_DEFATTR(not_tagged); -GR_DEFATTR(not_dragged); -GR_DEFATTR(activity); -GR_DEFATTR(no_activity); - - -static void init_attr() -{ - GR_ALLOCATTR_BEGIN; - GR_ALLOCATTR(active); - GR_ALLOCATTR(inactive); - GR_ALLOCATTR(selected); - GR_ALLOCATTR(tagged); - GR_ALLOCATTR(not_tagged); - GR_ALLOCATTR(not_dragged); - GR_ALLOCATTR(no_activity); - GR_ALLOCATTR(activity); - GR_ALLOCATTR_END; -} - - -static void screen_update_infowin(WScreen *scr) -{ - WRegion *reg=mplex_mx_current(&(scr->mplex)); - bool tag=(reg!=NULL && region_is_tagged(reg)); - bool act=(reg!=NULL && region_is_activity_r(reg) && !REGION_IS_ACTIVE(scr)); - bool sac=REGION_IS_ACTIVE(scr); - - if(tag || act){ - const char *n=region_displayname(reg); - WInfoWin *iw; - - screen_windowinfo(scr, n); - - iw=(WInfoWin*)scr->infowin_watch.obj; - - if(iw!=NULL){ - GrStyleSpec *spec=infowin_stylespec(iw); - - init_attr(); - - gr_stylespec_unalloc(spec); - - gr_stylespec_set(spec, GR_ATTR(selected)); - gr_stylespec_set(spec, GR_ATTR(not_dragged)); - gr_stylespec_set(spec, sac ? GR_ATTR(active) : GR_ATTR(inactive)); - gr_stylespec_set(spec, tag ? GR_ATTR(tagged) : GR_ATTR(not_tagged)); - gr_stylespec_set(spec, act ? GR_ATTR(activity) : GR_ATTR(no_activity)); - } - - }else{ - screen_nowindowinfo(scr); - } -} - - -static void screen_managed_notify(WScreen *scr, WRegion *reg, WRegionNotify how) -{ - if(how==ioncore_g.notifies.sub_activity){ - /* TODO: multiple calls */ - mainloop_defer_action((Obj*)scr, - (WDeferredAction*)screen_notify_activity); - }else if(how==ioncore_g.notifies.tag){ - mainloop_defer_action((Obj*)scr, - (WDeferredAction*)screen_notify_tag); - } -} - - -/*}}}*/ - - /*{{{ Misc. */ @@ -583,32 +365,33 @@ int screen_id(WScreen *scr) } -static bool screen_managed_may_destroy(WScreen *scr, WRegion *reg) +static WRegion *screen_managed_disposeroot(WScreen *scr, WRegion *reg) { - bool onmxlist=FALSE; + bool onmxlist=FALSE, others=FALSE; WLListNode *lnode; WLListIterTmp tmp; - - if(OBJ_IS(reg, WClientWin)) - return TRUE; - FOR_ALL_NODES_ON_LLIST(lnode, scr->mplex.mx_list, tmp){ - if(lnode->st->reg==reg) - onmxlist=TRUE; - else /*if(OBJ_IS(node->reg, WGenWS))*/ - return TRUE; + if(OBJ_IS(reg, WGroupWS)){ + FOR_ALL_NODES_ON_LLIST(lnode, scr->mplex.mx_list, tmp){ + if(lnode->st->reg==reg){ + onmxlist=TRUE; + }else if(OBJ_IS(lnode->st->reg, WGroupWS)){ + others=TRUE; + break; + } + } + + if(onmxlist && !others){ + warn(TR("Only workspace may not be destroyed/detached.")); + return NULL; + } } - if(!onmxlist) - return TRUE; - - warn(TR("Only workspace may not be destroyed.")); - - return FALSE; + return reg; } -static bool screen_may_destroy(WScreen *scr) +static bool screen_may_dispose(WScreen *scr) { warn(TR("Screens may not be destroyed.")); return FALSE; @@ -651,13 +434,6 @@ err: } -WPHolder *screen_get_rescue_pholder_for(WScreen *scr, WRegion *mgd) -{ -#warning "TODO: better special case handling for groups" - - return (WPHolder*)mplex_get_rescue_pholder_for(&(scr->mplex), mgd); -} - /*}}}*/ @@ -733,11 +509,11 @@ static DynFunTab screen_dynfuntab[]={ {region_inactivated, screen_inactivated}, - {(DynFun*)region_managed_may_destroy, - (DynFun*)screen_managed_may_destroy}, + {(DynFun*)region_managed_disposeroot, + (DynFun*)screen_managed_disposeroot}, - {(DynFun*)region_may_destroy, - (DynFun*)screen_may_destroy}, + {(DynFun*)region_may_dispose, + (DynFun*)screen_may_dispose}, {mplex_managed_changed, screen_managed_changed}, @@ -757,9 +533,6 @@ static DynFunTab screen_dynfuntab[]={ {(DynFun*)region_fitrep, (DynFun*)screen_fitrep}, - {(DynFun*)region_get_rescue_pholder_for, - (DynFun*)screen_get_rescue_pholder_for}, - END_DYNFUNTAB }; diff --git a/ioncore/screen.h b/ioncore/screen.h index 6555c17..8c1b9b5 100644 --- a/ioncore/screen.h +++ b/ioncore/screen.h @@ -42,7 +42,6 @@ DECLCLASS(WScreen){ int id; Atom atom_workspace; bool uses_root; - int rotation; WRectangle managed_off; WScreen *next_scr, *prev_scr; Watch notifywin_watch; @@ -65,13 +64,6 @@ extern void screen_set_managed_offset(WScreen *scr, const WRectangle *off); extern bool screen_init_layout(WScreen *scr, ExtlTab tab); -extern void screen_notify(WScreen *scr, const char *notstr); -extern void screen_unnotify(WScreen *scr); -extern void screen_windowinfo(WScreen *scr, const char *name); -extern void screen_nowindowinfo(WScreen *scr); - -extern WPHolder *screen_get_rescue_pholder_for(WScreen *scr, WRegion *mgd); - extern WScreen *ioncore_find_screen_id(int id); extern WScreen *ioncore_goto_screen_id(int id); extern WScreen *ioncore_goto_next_screen(); diff --git a/ioncore/sizehint.c b/ioncore/sizehint.c index b574753..ee5560f 100644 --- a/ioncore/sizehint.c +++ b/ioncore/sizehint.c @@ -70,8 +70,8 @@ static void correct_aspect(int max_w, int max_h, const WSizeHints *hints, void sizehints_correct(const WSizeHints *hints, int *wp, int *hp, bool min, bool override_no_constrain) { - int w=*wp; - int h=*hp; + int w=*wp, wa; + int h=*hp, ha; int bs=0; if(min){ @@ -85,8 +85,14 @@ void sizehints_correct(const WSizeHints *hints, int *wp, int *hp, return; } - if(w>=hints->min_width && h>=hints->min_height) - correct_aspect(w, h, hints, &w, &h); + wa=w-hints->base_width; + ha=h-hints->base_height; + + if(wa>=0 && ha>=0){ + correct_aspect(wa, ha, hints, &wa, &ha); + w=wa+hints->base_width; + h=ha+hints->base_height; + } if(hints->max_set){ w=minof(w, hints->max_width); @@ -132,9 +138,9 @@ void xsizehints_sanity_adjust(XSizeHints *hints) hints->min_height=0; if(!(hints->flags&PBaseSize) || hints->base_width<0) - hints->base_width=hints->min_width; + hints->base_width=0; if(!(hints->flags&PBaseSize) || hints->base_height<0) - hints->base_height=hints->min_height; + hints->base_height=0; if(hints->flags&PMaxSize){ diff --git a/ioncore/tags.c b/ioncore/tags.c index 383af0c..f01385d 100644 --- a/ioncore/tags.c +++ b/ioncore/tags.c @@ -70,9 +70,9 @@ bool region_is_tagged(WRegion *reg) * Untag all regions. */ EXTL_EXPORT -void ioncore_clear_tags() +void ioncore_tagged_clear() { - while(ioncore_tagged_take_first()!=NULL) + while(ioncore_tagged_first(TRUE)!=NULL) /* nothing */; } @@ -84,28 +84,29 @@ void ioncore_clear_tags() /*EXTL_DOC - * Returns first tagged object. + * Returns first tagged object, untagging it as well if \var{untag}is set. */ EXTL_SAFE EXTL_EXPORT -WRegion *ioncore_tagged_first() +WRegion *ioncore_tagged_first(bool untag) { - return (WRegion*)OBJLIST_FIRST(WRegion*, taglist); -} - - -WRegion *ioncore_tagged_take_first() -{ - WRegion *reg=(WRegion*)objlist_take_first(&taglist); + WRegion *reg; - if(reg!=NULL){ - reg->flags&=~REGION_TAGGED; - region_notify_change(reg, ioncore_g.notifies.tag); + if(!untag){ + reg=(WRegion*)OBJLIST_FIRST(WRegion*, taglist); + }else{ + reg=(WRegion*)objlist_take_first(&taglist); + + if(reg!=NULL){ + reg->flags&=~REGION_TAGGED; + region_notify_change(reg, ioncore_g.notifies.tag); + } } return reg; } + /*EXTL_DOC * Iterate over tagged regions until \var{iterfn} returns \code{false}. * The function itself returns \code{true} if it reaches the end of list diff --git a/ioncore/tags.h b/ioncore/tags.h index a8fe8f5..6f30292 100644 --- a/ioncore/tags.h +++ b/ioncore/tags.h @@ -18,8 +18,8 @@ extern bool region_set_tagged(WRegion *reg, int sp); extern bool region_is_tagged(WRegion *reg); -extern void ioncore_clear_tags(); -extern WRegion *ioncore_tagged_first(); -extern WRegion *ioncore_tagged_take_first(); +extern void ioncore_tagged_clear(); +extern WRegion *ioncore_tagged_first(bool untag); +extern bool ioncore_tagged_i(ExtlFn iterfn); #endif /* ION_IONCORE_TAGS_H */ diff --git a/ioncore/xwindow.c b/ioncore/xwindow.c index 9ce3df2..9d4cea7 100644 --- a/ioncore/xwindow.c +++ b/ioncore/xwindow.c @@ -112,10 +112,10 @@ void xwindow_set_cursor(Window win, int cursor) bool xwindow_pointer_pos(Window rel, int *px, int *py) { Window win=None, realroot=None; - int wx=0, wy=0; + int rx=0, ry=0; uint mask=0; return XQueryPointer(ioncore_g.dpy, rel, &realroot, &win, - px, py, &wx, &wy, &mask); + &rx, &ry, px, py, &mask); } /*}}}*/ diff --git a/libextl/exact-version b/libextl/exact-version index 3ff2401..66bf973 100644 --- a/libextl/exact-version +++ b/libextl/exact-version @@ -1,6 +1,11 @@ Context: +[Improved mechanisms for unregistration of functions. +Tuomo Valkonen **20070226150118 + Makes for a bit smaller memory footprint. +] + [Updated *.mk locations. Tuomo Valkonen **20060803211018] diff --git a/libextl/libextl-mkexports.in b/libextl/libextl-mkexports.in index ff1cac3..bbb672d 100644 --- a/libextl/libextl-mkexports.in +++ b/libextl/libextl-mkexports.in @@ -468,13 +468,13 @@ function write_class_fns(h, cls, data) ids='"' .. info.idesc .. '"' end - fprintf(h, " {\"%s\", %s, %s, %s, (ExtlL2CallHandler*)%s, %s, %s},\n", + fprintf(h, " {\"%s\", %s, %s, %s, (ExtlL2CallHandler*)%s, %s, %s, FALSE},\n", info.exported_name, fn, ids, ods, info.chnd, bool2str4c(info.safe), bool2str4c(info.untraced)) end - fprintf(h, " {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE}\n};\n\n") + fprintf(h, " {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}\n};\n\n") end diff --git a/libextl/luaextl.c b/libextl/luaextl.c index c53fde6..a2cc2b9 100644 --- a/libextl/luaextl.c +++ b/libextl/luaextl.c @@ -444,7 +444,7 @@ bool dopath(const char *what); static bool extl_init_obj_info(lua_State *st) { static ExtlExportedFnSpec dummy[]={ - {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE} + {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE} }; extl_register_class("Obj", dummy, NULL); @@ -1746,7 +1746,7 @@ static int extl_l1_call_handler2(lua_State *st) D(fprintf(stderr, "%s called\n", spec->name)); - if(!lua_checkstack(st, MAX_PARAMS+1)){ + if(!lua_checkstack(st, MAX_PARAMS+1)){ extl_warn(TR("Stack full.")); return 0; } @@ -1828,7 +1828,7 @@ static int extl_l1_call_handler(lua_State *st) return 0; } - if(param.spec->fn==NULL){ + if(!param.spec->registered){ extl_warn(TR("Called function has been unregistered.")); return 0; } @@ -1962,22 +1962,14 @@ static bool extl_do_register_function(lua_State *st, RegData *data) lua_rawgeti(st, LUA_REGISTRYINDEX, data->table); ind=-3; } - - lua_pushstring(st, spec->name); - - spec2=lua_newuserdata(st, sizeof(ExtlExportedFnSpec)); - memcpy(spec2, spec, sizeof(ExtlExportedFnSpec)); + lua_pushstring(st, spec->name); - lua_getregistry(st); - lua_pushvalue(st, -2); /* Get spec2 */ - lua_pushfstring(st, "luaextl_%s_%s_upvalue", - data->cls, spec->name); - lua_rawset_check(st, -3); /* Set registry.luaextl_fn_upvalue=spec2 */ - lua_pop(st, 1); /* Pop registry */ + lua_pushlightuserdata(st, spec); lua_pushcclosure(st, extl_l1_call_handler, 1); + lua_rawset_check(st, ind); - + return TRUE; } @@ -1998,6 +1990,7 @@ static bool extl_do_register_functions(ExtlExportedFnSpec *spec, int max, ®data)){ return FALSE; } + spec[i].registered=TRUE; } return TRUE; @@ -2018,28 +2011,8 @@ bool extl_register_functions(ExtlExportedFnSpec *spec) static bool extl_do_unregister_function(lua_State *st, RegData *data) { - ExtlExportedFnSpec *spec=data->spec, *spec2; + ExtlExportedFnSpec *spec=data->spec; int ind=LUA_GLOBALSINDEX; - - lua_getregistry(st); - lua_pushfstring(st, "luaextl_%s_%s_upvalue", - data->cls, spec->name); - lua_pushvalue(st, -1); - lua_gettable(st, -3); /* Get registry.luaextl_fn_upvalue */ - spec2=lua_touserdata(st, -1); - - if(spec2==NULL) - return FALSE; - - spec2->ispec=NULL; - spec2->ospec=NULL; - spec2->fn=NULL; - spec2->name=NULL; - spec2->l2handler=NULL; - - lua_pop(st, 1); /* Pop the upvalue */ - lua_pushnil(st); - lua_rawset_check(st, -3); /* Clear registry.luaextl_fn_upvalue */ if(data->table!=LUA_NOREF){ lua_rawgeti(st, LUA_REGISTRYINDEX, data->table); @@ -2069,6 +2042,7 @@ static void extl_do_unregister_functions(ExtlExportedFnSpec *spec, int max, regdata.spec=&(spec[i]); extl_cpcall(l_st, (ExtlCPCallFn*)extl_do_unregister_function, ®data); + spec[i].registered=FALSE; } } diff --git a/libextl/luaextl.h b/libextl/luaextl.h index 28cfde8..f31cc97 100644 --- a/libextl/luaextl.h +++ b/libextl/luaextl.h @@ -56,6 +56,7 @@ typedef struct{ ExtlL2CallHandler *l2handler; bool safe; bool untraced; + bool registered; } ExtlExportedFnSpec; typedef struct ExtlSafelist_struct{ diff --git a/libmainloop/defer.c b/libmainloop/defer.c index dfc0e89..c8d5616 100644 --- a/libmainloop/defer.c +++ b/libmainloop/defer.c @@ -84,12 +84,29 @@ static void defer_watch_handler(Watch *w, Obj *obj) warn(TR("Object destroyed while deferred actions are still pending.")); } + +static bool already_deferred(Obj *obj, WDeferredAction *action, + WDeferred *list) +{ + WDeferred *d; + + for(d=list; d!=NULL; d=d->next){ + if(d->action==action && d->watch.obj==obj) + return TRUE; + } + return FALSE; +} + + bool mainloop_defer_action_on_list(Obj *obj, WDeferredAction *action, WDeferred **list) { WDeferred *d; + if(already_deferred(obj, action, *list)) + return TRUE; + d=alloc_defer(); if(d==NULL){ diff --git a/libtu/errorlog.c b/libtu/errorlog.c index da97713..f2b787a 100644 --- a/libtu/errorlog.c +++ b/libtu/errorlog.c @@ -39,7 +39,7 @@ static void add_to_log(ErrorLog *el, const char *message, int l) if(el->msgs==NULL){ el->msgs=ALLOC_N(char, ERRORLOG_MAX_SIZE); if(el->msgs==NULL){ - fprintf(stderr, "%s: %s\n", prog_execname(), strerror(errno)); + fprintf(stderr, "%s: %s\n", libtu_progname(), strerror(errno)); return; } el->msgs[0]=0; diff --git a/libtu/exact-version b/libtu/exact-version index 420d613..694c1e0 100644 --- a/libtu/exact-version +++ b/libtu/exact-version @@ -1,6 +1,12 @@ Context: +[Renamed `prog_execname` `libtu_progname` and added `libtu_progbasename`. +Tuomo Valkonen **20070310230536] + +[Better handling of STRINGID_NONE +Tuomo Valkonen **20070219231818] + [Clean-up and pending updates Tuomo Valkonen **20070129141139] diff --git a/libtu/output.c b/libtu/output.c index 6c70186..3939545 100644 --- a/libtu/output.c +++ b/libtu/output.c @@ -98,7 +98,7 @@ static void put_prog_name() if(!progname_enable) return; - progname=prog_execname(); + progname=libtu_progname(); if(progname==NULL) return; diff --git a/libtu/stringstore.c b/libtu/stringstore.c index 5529820..e47c902 100644 --- a/libtu/stringstore.c +++ b/libtu/stringstore.c @@ -105,6 +105,9 @@ StringId stringstore_alloc_n(const char *str, uint l) StringId stringstore_alloc(const char *str) { + if(str==NULL) + return STRINGID_NONE; + return stringstore_alloc_n(str, strlen(str)); } @@ -113,10 +116,8 @@ void stringstore_free(StringId id) { Rb_node node=(Rb_node)id; - if(node==NULL){ - warn("Attempt to free un-allocated string from stringstore."); + if(node==NULL) return; - } if(node->v.ival<=0){ warn("Stringstore reference count corrupted."); diff --git a/libtu/util.c b/libtu/util.c index aafdf13..b0c9699 100644 --- a/libtu/util.c +++ b/libtu/util.c @@ -30,8 +30,16 @@ void libtu_init(const char *argv0) } -const char *prog_execname() +const char *libtu_progname() { return progname; } + +const char *libtu_progbasename() +{ + const char *s=strrchr(progname, '/'); + + return (s==NULL ? progname : s+1); +} + diff --git a/libtu/util.h b/libtu/util.h index c8bddcf..d4438ce 100644 --- a/libtu/util.h +++ b/libtu/util.h @@ -18,6 +18,7 @@ #include "optparser.h" extern void libtu_init(const char *argv0); -extern const char *prog_execname(); +extern const char *libtu_progname(); +extern const char *libtu_progbasename(); #endif /* LIBTU_UTIL_H */ diff --git a/mod_dock/dock.c b/mod_dock/dock.c index c67ce6d..ca41852 100644 --- a/mod_dock/dock.c +++ b/mod_dock/dock.c @@ -1155,18 +1155,6 @@ static void dock_deinit(WDock *dock) } -bool dock_may_destroy(WDock *dock) -{ - if(dock->dockapps!=NULL){ - warn_obj(modname, "Dock \"%s\" is still managing other objects " - " -- refusing to close.", region_name((WRegion*)dock)); - return FALSE; - } - - return TRUE; -} - - EXTL_EXPORT WDock *mod_dock_create(ExtlTab tab) { @@ -1683,7 +1671,6 @@ static DynFunTab dock_dynfuntab[]={ {region_size_hints, dock_size_hints}, {(DynFun*)region_fitrep, (DynFun*)dock_fitrep}, {(DynFun*)region_orientation, (DynFun*)dock_orientation}, - {(DynFun*)region_may_destroy, (DynFun*)dock_may_destroy}, {(DynFun*)region_handle_drop, (DynFun*)dock_handle_drop}, {(DynFun*)region_managed_get_pholder, diff --git a/mod_menu/grabmenu.c b/mod_menu/grabmenu.c index 79a01ce..05e801f 100644 --- a/mod_menu/grabmenu.c +++ b/mod_menu/grabmenu.c @@ -37,15 +37,25 @@ static bool grabmenu_handler(WRegion *reg, XEvent *xev) if(reg==NULL) return FALSE; - if((menu->gm_state==ev->state || menu->gm_state==AnyModifier) - && ev->keycode==menu->gm_kcb){ - menu_select_next(menu); + if(ev->keycode==menu->gm_kcb){ + if(menu->gm_state==ev->state) + menu_select_next(menu); + else if((menu->gm_state|ShiftMask)==ev->state) + menu_select_prev(menu); + else if(menu->gm_state==AnyModifier) + menu_select_next(menu); } return FALSE; } +static void grabkilled_handler(WRegion *reg) +{ + destroy_obj((Obj*)reg); +} + + /*--lowlevel routine not to be called by the user--*/ EXTL_EXPORT WMenu *mod_menu_do_grabmenu(WMPlex *mplex, ExtlFn handler, ExtlTab tab, @@ -62,8 +72,16 @@ WMenu *mod_menu_do_grabmenu(WMPlex *mplex, ExtlFn handler, ExtlTab tab, return NULL; if(state==0){ - /* TODO: cycle key? */ - return mod_menu_do_menu(mplex, handler, tab, param); + WMenu *menu=mod_menu_do_menu(mplex, handler, tab, param); + /* + if(menu!=NULL && cycle!=extl_fn_none()){ + uint kcb, state; + + menu->cycle_bindmap=region_add_cycle_bindmap((WRegion*)menu, + kcb, state, ???, + ???); + }*/ + return menu; } fnp.handler=handler; @@ -89,7 +107,8 @@ WMenu *mod_menu_do_grabmenu(WMPlex *mplex, ExtlFn handler, ExtlTab tab, menu->gm_kcb=kcb; menu->gm_state=state; - ioncore_grab_establish((WRegion*)menu, grabmenu_handler, NULL, 0); + ioncore_grab_establish((WRegion*)menu, grabmenu_handler, + grabkilled_handler, 0); return menu; } diff --git a/mod_menu/menu.c b/mod_menu/menu.c index d891c23..df3a2b0 100644 --- a/mod_menu/menu.c +++ b/mod_menu/menu.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include "menu.h" #include "main.h" @@ -391,6 +393,26 @@ bool menu_fitrep(WMenu *menu, WWindow *par, const WFitParams *fp) } +void menu_size_hints(WMenu *menu, WSizeHints *hints_ret) +{ + int n=menu->n_entries; + int w=menu->max_entry_w; + int h=menu->entry_h*n + menu->entry_spacing*maxof(0, n-1); + + if(menu->brush!=NULL){ + GrBorderWidths bdw; + grbrush_get_border_widths(menu->brush, &bdw); + + w+=bdw.left+bdw.right; + h+=bdw.top+bdw.bottom; + } + + hints_ret->min_set=TRUE; + hints_ret->min_width=w; + hints_ret->min_height=h; +} + + /*}}}*/ @@ -584,7 +606,8 @@ bool menu_init(WMenu *menu, WWindow *par, const WFitParams *fp, menu->handler=extl_ref_fn(params->handler); menu->pmenu_mode=params->pmenu_mode; menu->big_mode=params->big_mode; - + /*menu->cycle_bindmap=NULL;*/ + menu->last_fp=*fp; if(params->pmenu_mode){ @@ -668,6 +691,9 @@ void menu_deinit(WMenu *menu) if(menu->submenu!=NULL) destroy_obj((Obj*)menu->submenu); + /*if(menu->cycle_bindmap!=NULL) + bindmap_destroy(menu->cycle_bindmap);*/ + extl_unref_table(menu->tab); extl_unref_fn(menu->handler); @@ -945,10 +971,10 @@ static void menu_do_finish(WMenu *menu) ok=extl_table_geti_t(menu->tab, menu->selected_entry+1, &tab); - if(region_manager_allows_destroying((WRegion*)head)) - destroy_obj((Obj*)head); - else if(head->submenu!=NULL) - destroy_obj((Obj*)head->submenu); + if(!region_rqdispose((WRegion*)head)){ + if(head->submenu!=NULL) + destroy_obj((Obj*)head->submenu); + } if(ok) extl_call(handler, "t", NULL, tab); @@ -984,8 +1010,7 @@ void menu_finish(WMenu *menu) EXTL_EXPORT_MEMBER void menu_cancel(WMenu *menu) { - if(region_manager_allows_destroying((WRegion*)menu)) - region_dispose_((WRegion*)menu); + region_defer_rqdispose((WRegion*)menu); } @@ -1416,6 +1441,7 @@ static DynFunTab menu_dynfuntab[]={ {window_insstr, menu_insstr}, {region_restack, menu_restack}, {region_stacking, menu_stacking}, + {region_size_hints, menu_size_hints}, END_DYNFUNTAB }; diff --git a/mod_menu/menu.h b/mod_menu/menu.h index 38dd1f8..8d856e0 100644 --- a/mod_menu/menu.h +++ b/mod_menu/menu.h @@ -16,6 +16,7 @@ #include #include #include +#include INTRCLASS(WMenu); INTRSTRUCT(WMenuEntry); @@ -50,6 +51,8 @@ DECLCLASS(WMenu){ char *typeahead; uint gm_kcb, gm_state; + + /*WBindmap *cycle_bindmap;*/ }; diff --git a/mod_menu/mod_menu.lua b/mod_menu/mod_menu.lua index 913ad16..705a66e 100644 --- a/mod_menu/mod_menu.lua +++ b/mod_menu/mod_menu.lua @@ -37,7 +37,7 @@ local function menu_(reg, sub, menu_or_name, fn, check) end end - menu=menudb.evalmenu(menu_or_name, {reg, sub}) + menu=menudb.evalmenu(menu_or_name, reg, sub) return fn(reg, function(e) e.func(reg, sub) end, menu) end @@ -57,17 +57,15 @@ end -- to use a bigger style by setting the field \var{big} to \code{true}. function mod_menu.menu(mplex, sub, menu_or_name, param) local function menu_stdmenu(m, s, menu) - return mod_menu.do_menu(m, s, menu, param) + return ioncore.unsqueeze(mod_menu.do_menu(m, s, menu, param)) end return menu_(mplex, sub, menu_or_name, menu_stdmenu, true) end -- Compatibility function mod_menu.bigmenu(mplex, sub, menu_or_name, initial) - local function menu_bigmenu(m, s, menu) - return mod_menu.do_menu(m, s, menu, {big=true, initial=initial}) - end - return menu_(mplex, sub, menu_or_name, menu_bigmenu, true) + local param={big=true, initial=initial} + return mod_menu.menu(mplex, sub, menu_or_name, param) end --DOC diff --git a/mod_query/fwarn.c b/mod_query/fwarn.c index e10d277..5122948 100644 --- a/mod_query/fwarn.c +++ b/mod_query/fwarn.c @@ -19,11 +19,11 @@ #include "fwarn.h" -/*EXTL_DOC +/*(internal) EXTL_DOC * Display an error message box in the multiplexer \var{mplex}. */ EXTL_EXPORT -WMessage *mod_query_warn(WMPlex *mplex, const char *p) +WMessage *mod_query_do_warn(WMPlex *mplex, const char *p) { char *p2; WMessage *wmsg; @@ -36,18 +36,19 @@ WMessage *mod_query_warn(WMPlex *mplex, const char *p) if(p2==NULL) return NULL; - wmsg=mod_query_message(mplex, p2); + wmsg=mod_query_do_message(mplex, p2); free(p2); return wmsg; } -/*EXTL_DOC + +/*(internal) EXTL_DOC * Display a message in the \var{mplex}. */ EXTL_EXPORT -WMessage *mod_query_message(WMPlex *mplex, const char *p) +WMessage *mod_query_do_message(WMPlex *mplex, const char *p) { WMPlexAttachParams par; diff --git a/mod_query/fwarn.h b/mod_query/fwarn.h index 6e91a64..9aed256 100644 --- a/mod_query/fwarn.h +++ b/mod_query/fwarn.h @@ -15,7 +15,7 @@ #include #include "wmessage.h" -extern WMessage *mod_query_message(WMPlex *mplex, const char *p); -extern WMessage *mod_query_fwarn(WMPlex *mplex, const char *p); +extern WMessage *mod_query_do_message(WMPlex *mplex, const char *p); +extern WMessage *mod_query_do_fwarn(WMPlex *mplex, const char *p); #endif /* ION_MOD_QUERY_FWARN_H */ diff --git a/mod_query/input.c b/mod_query/input.c index 7f8ac99..57a23c5 100644 --- a/mod_query/input.c +++ b/mod_query/input.c @@ -161,8 +161,7 @@ void input_deinit(WInput *input) EXTL_EXPORT_MEMBER void input_cancel(WInput *input) { - if(region_manager_allows_destroying((WRegion*)input)) - region_dispose_((WRegion*)input); + region_defer_rqdispose((WRegion*)input); } @@ -187,6 +186,29 @@ static void input_activated(WInput *input) /*}}}*/ +/*{{{{ Misc */ + + +void mod_query_get_minimum_extents(GrBrush *brush, bool with_spacing, + int *w, int *h) +{ + GrBorderWidths bdw; + GrFontExtents fnte; + int spc; + + grbrush_get_border_widths(brush, &bdw); + grbrush_get_font_extents(brush, &fnte); + + spc=(with_spacing ? bdw.spacing : 0); + + *h=(fnte.max_height+bdw.top+bdw.bottom+spc); + *w=(bdw.left+bdw.right+spc); +} + + +/*}}}*/ + + /*{{{ Dynamic function table and class implementation */ diff --git a/mod_query/input.h b/mod_query/input.h index 4f9f758..3dbde2e 100644 --- a/mod_query/input.h +++ b/mod_query/input.h @@ -39,4 +39,7 @@ DYNFUN void input_scrolldown(WInput *input); DYNFUN void input_calc_size(WInput *input, WRectangle *geom); DYNFUN const char *input_style(WInput *input); +extern void mod_query_get_minimum_extents(GrBrush *brush, bool with_spacing, + int *w, int *h); + #endif /* ION_MOD_QUERY_INPUT_H */ diff --git a/mod_query/mod_query.lua b/mod_query/mod_query.lua index 243f987..1bd3e23 100644 --- a/mod_query/mod_query.lua +++ b/mod_query/mod_query.lua @@ -31,6 +31,20 @@ local DIE_TIMEOUT_NO_ERRORCODE=2 -- 2 seconds -- Generic helper functions {{{ +--DOC +-- Display an error message box in the multiplexer \var{mplex}. +function mod_query.warn(mplex, str) + ioncore.unsqueeze(mod_query.do_warn(mplex, str)) +end + + +--DOC +-- Display a message in \var{mplex}. +function mod_query.message(mplex, str) + ioncore.unsqueeze(mod_query.do_message(mplex, str)) +end + + --DOC -- Low-level query routine. \var{mplex} is the \type{WMPlex} to display -- the query in, \var{prompt} the prompt string, and \var{initvalue} @@ -50,6 +64,9 @@ function mod_query.query(mplex, prompt, initvalue, handler, completor, local function cycle(wedln) wedln:complete('next', 'normal') end + local function bcycle(wedln) + wedln:complete('prev', 'normal') + end -- Check that no other queries are open in the mplex. local ok=mplex:managed_i(function(r) @@ -60,9 +77,14 @@ function mod_query.query(mplex, prompt, initvalue, handler, completor, end local wedln=mod_query.do_query(mplex, prompt, initvalue, - handle_it, completor, cycle) - if context then - wedln:set_context(context) + handle_it, completor, cycle, bcycle) + + if wedln then + ioncore.unsqueeze(wedln) + + if context then + wedln:set_context(context) + end end return wedln @@ -437,24 +459,12 @@ function mod_query.attachclient_handler(frame, str) return end - local reg=cwin:manager() - local attach + local reg=cwin:groupleader_of() - if not obj_is(reg, "WGroupCW") then - reg = cwin - attach = function() - frame:attach_new { - type = "WGroupCW", - switchto = true, - managed = {{ reg = cwin, bottom = true }} - } - end - else - attach = function() - frame:attach(reg, { switchto = true }) - end + local function attach() + frame:attach(reg, { switchto = true }) end - + if frame:rootwin_of()~=reg:rootwin_of() then mod_query.warn(frame, TR("Cannot attach: different root windows.")) elseif reg:manager()==frame then @@ -961,8 +971,10 @@ end function mod_query.man_completor(wedln, str) local mc=ioncore.lookup_script("ion-completeman") + local icase=(mod_query.get().caseicompl and " -icase" or "") + local mid="" if mc then - mod_query.popen_completions(wedln, (mc.." -complete " + mod_query.popen_completions(wedln, (mc..icase..mid.." -complete " ..string.shell_safe(str))) end end @@ -1132,9 +1144,15 @@ end --DOC -- This query can be used to create a query of a defined menu. -function mod_query.query_menu(mplex, themenu, prompt) - local _sub=mplex:current() - local menu=ioncore.evalmenu(themenu, {mplex, _sub}) +function mod_query.query_menu(mplex, sub, themenu, prompt) + if type(sub)=="string" then + -- Backwards compat. shift + prompt=themenu + themenu=sub + sub=nil + end + + local menu=ioncore.evalmenu(themenu, mplex, sub) local menuname=(type(themenu)=="string" and themenu or "?") if not menu then @@ -1149,19 +1167,25 @@ function mod_query.query_menu(mplex, themenu, prompt) end local function xform_name(n, is_submenu) - return (string.lower(string.gsub(n, "[-/%s]+", "-")) - ..(is_submenu and "/" or "")) + return string.lower(string.gsub(n, "[-/%s]+", "-")) end local function xform_menu(t, m, p) for _, v in ipairs(m) do if v.name then local is_submenu=v.submenu_fn - local n=p..xform_name(v.name, is_submenu) - while t[n] do + local n=p..xform_name(v.name) + + while t[n] or t[n..'/'] do n=n.."'" end + + if is_submenu then + n=n..'/' + end + t[n]=v + if is_submenu and not v.noautoexpand then local sm=v.submenu_fn() if sm then diff --git a/mod_query/query.c b/mod_query/query.c index 9318c89..9418af5 100644 --- a/mod_query/query.c +++ b/mod_query/query.c @@ -15,43 +15,12 @@ #include #include #include +#include #include #include "query.h" #include "wedln.h" -static void create_cycle_binding(WEdln *wedln, uint kcb, uint state, ExtlFn cycle) -{ - WBindmap *bindmap=create_bindmap(); - WBinding b; - - if(bindmap==NULL) - return; - - b.ksb=XKeycodeToKeysym(ioncore_g.dpy, kcb, 0); - b.kcb=kcb; - b.state=state; - b.act=BINDING_KEYPRESS; - b.area=0; - b.wait=FALSE; - b.submap=NULL; - b.func=extl_ref_fn(cycle); - - if(!bindmap_add_binding(bindmap, &b)){ - extl_unref_fn(b.func); - bindmap_destroy(bindmap); - return; - } - - if(!region_add_bindmap((WRegion*)wedln, bindmap)){ - bindmap_destroy(bindmap); - return; - } - - wedln->cycle_bindmap=bindmap; -} - - /*--lowlevel routine not to be called by the user--EXTL_DOC * Show a query window in \var{mplex} with prompt \var{prompt}, initial * contents \var{dflt}. The function \var{handler} is called with @@ -62,7 +31,8 @@ static void create_cycle_binding(WEdln *wedln, uint kcb, uint state, ExtlFn cycl */ EXTL_EXPORT WEdln *mod_query_do_query(WMPlex *mplex, const char *prompt, const char *dflt, - ExtlFn handler, ExtlFn completor, ExtlFn cycle) + ExtlFn handler, ExtlFn completor, + ExtlFn cycle, ExtlFn bcycle) { WRectangle geom; WEdlnCreateParams fnp; @@ -88,8 +58,11 @@ WEdln *mod_query_do_query(WMPlex *mplex, const char *prompt, const char *dflt, uint kcb, state; bool sub; - if(ioncore_current_key(&kcb, &state, &sub) && !sub) - create_cycle_binding(wedln, kcb, state, cycle); + if(ioncore_current_key(&kcb, &state, &sub) && !sub){ + wedln->cycle_bindmap=region_add_cycle_bindmap((WRegion*)wedln, + kcb, state, cycle, + bcycle); + } } return wedln; diff --git a/mod_query/query.h b/mod_query/query.h index 87b60ee..3c67b3c 100644 --- a/mod_query/query.h +++ b/mod_query/query.h @@ -17,8 +17,9 @@ #include #include "wedln.h" -extern WEdln *mod_query_do_query(WMPlex *mplex, const char *prompt, - const char *dflt, ExtlFn handler, - ExtlFn completor, ExtlFn cycle); +extern WEdln *mod_query_do_query(WMPlex *mplex, + const char *prompt, const char *dflt, + ExtlFn handler, ExtlFn completor, + ExtlFn cycle, ExtlFn bcycle); #endif /* ION_MOD_QUERY_QUERY_H */ diff --git a/mod_query/wedln.c b/mod_query/wedln.c index fa9193c..470b05b 100644 --- a/mod_query/wedln.c +++ b/mod_query/wedln.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include "edln.h" #include "wedln.h" #include "inputp.h" @@ -225,14 +227,12 @@ static bool wedln_update_cursor(WEdln *wedln, int iw) static int get_textarea_height(WEdln *wedln, bool with_spacing) { - GrBorderWidths bdw; - GrFontExtents fnte; + int w=1, h=1; - grbrush_get_border_widths(WEDLN_BRUSH(wedln), &bdw); - grbrush_get_font_extents(WEDLN_BRUSH(wedln), &fnte); + if(WEDLN_BRUSH(wedln)!=NULL) + mod_query_get_minimum_extents(WEDLN_BRUSH(wedln), with_spacing, &w, &h); - return (fnte.max_height+bdw.top+bdw.bottom+ - (with_spacing ? bdw.spacing : 0)); + return h; } @@ -355,6 +355,22 @@ static void wedln_calc_size(WEdln *wedln, WRectangle *geom) } +void wedln_size_hints(WEdln *wedln, WSizeHints *hints_ret) +{ + int w=1, h=1; + + if(WEDLN_BRUSH(wedln)!=NULL){ + mod_query_get_minimum_extents(WEDLN_BRUSH(wedln), FALSE, &w, &h); + w+=wedln->prompt_w+wedln->info_w; + w+=grbrush_get_text_width(WEDLN_BRUSH(wedln), "xxxxxxxxxx", 10); + } + + hints_ret->min_set=TRUE; + hints_ret->min_width=w; + hints_ret->min_height=h; +} + + /*}}}*/ @@ -1011,8 +1027,7 @@ static void wedln_do_finish(WEdln *wedln) wedln->handler=extl_fn_none(); p=edln_finish(&(wedln->edln)); - if(region_manager_allows_destroying((WRegion*)wedln)) - destroy_obj((Obj*)wedln); + region_rqdispose((WRegion*)wedln); if(p!=NULL) extl_call(handler, "s", NULL, p); @@ -1077,6 +1092,7 @@ static DynFunTab wedln_dynfuntab[]={ {input_scrolldown, wedln_scrolldown_completions}, {window_insstr, wedln_insstr}, {(DynFun*)input_style, (DynFun*)wedln_style}, + {region_size_hints, wedln_size_hints}, END_DYNFUNTAB }; diff --git a/mod_query/wmessage.c b/mod_query/wmessage.c index b8c5fa4..e7c5d3d 100644 --- a/mod_query/wmessage.c +++ b/mod_query/wmessage.c @@ -11,12 +11,14 @@ #include -#include #include +#include #include #include #include #include +#include +#include #include "wmessage.h" #include "inputp.h" @@ -72,6 +74,22 @@ static void wmsg_calc_size(WMessage *wmsg, WRectangle *geom) } +void wmsg_size_hints(WMessage *wmsg, WSizeHints *hints_ret) +{ + int w=1, h=1; + + if(WMSG_BRUSH(wmsg)!=NULL){ + mod_query_get_minimum_extents(WMSG_BRUSH(wmsg), FALSE, &w, &h); + + w+=grbrush_get_text_width(WMSG_BRUSH(wmsg), "xxxxx", 5); + } + + hints_ret->min_set=TRUE; + hints_ret->min_width=w; + hints_ret->min_height=h; +} + + /*}}}*/ @@ -233,12 +251,12 @@ static const char *wmsg_style(WMessage *wmsg) static DynFunTab wmsg_dynfuntab[]={ - {window_draw, wmsg_draw}, - {input_calc_size, wmsg_calc_size}, - {input_scrollup, wmsg_scrollup}, - {input_scrolldown, wmsg_scrolldown}, - {(DynFun*)input_style, - (DynFun*)wmsg_style}, + {window_draw, wmsg_draw}, + {input_calc_size, wmsg_calc_size}, + {input_scrollup, wmsg_scrollup}, + {input_scrolldown, wmsg_scrolldown}, + {(DynFun*)input_style, (DynFun*)wmsg_style}, + {region_size_hints, wmsg_size_hints}, END_DYNFUNTAB }; diff --git a/mod_sm/sm.c b/mod_sm/sm.c index d47a546..16bd2d2 100644 --- a/mod_sm/sm.c +++ b/mod_sm/sm.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -84,7 +85,7 @@ static void mod_sm_set_sessiondir() * to the session. */ if(smdir!=NULL){ - tmp=scat(smdir, "/ion3"); /* TODO: pwm<=>ion! */ + tmp=scat3(smdir, "/", libtu_progbasename()); }else if(id!=NULL){ tmp=scat("gnome-session-", id); if(tmp!=NULL){ diff --git a/mod_statusbar/Makefile b/mod_statusbar/Makefile index 0a13f4d..6a0102e 100644 --- a/mod_statusbar/Makefile +++ b/mod_statusbar/Makefile @@ -27,8 +27,5 @@ include $(TOPDIR)/build/rules.mk ###################################### -_install: module_install symlink_install +_install: module_install -symlink_install: - rm -f $(LCDIR)/ext_statusbar.lc - ln -s mod_statusbar.lc $(LCDIR)/ext_statusbar.lc diff --git a/mod_statusbar/ion-statusd/ion-statusd.c b/mod_statusbar/ion-statusd/ion-statusd.c index 0e0cdb0..d3c2102 100644 --- a/mod_statusbar/ion-statusd/ion-statusd.c +++ b/mod_statusbar/ion-statusd/ion-statusd.c @@ -88,7 +88,7 @@ static ExtlTab configtab; static void help() { int i; - printf(TR("Usage: %s [options]\n\n"), prog_execname()); + printf(TR("Usage: %s [options]\n\n"), libtu_progname()); for(i=0; ion_opts[i].descr!=NULL; i++) ion_opts[i].descr=TR(ion_opts[i].descr); optparser_printhelp(OPTP_MIDLONG, ion_opts); diff --git a/mod_tiling/Makefile b/mod_tiling/Makefile index a921270..27ebe94 100644 --- a/mod_tiling/Makefile +++ b/mod_tiling/Makefile @@ -17,6 +17,7 @@ SOURCES=main.c tiling.c placement.c split.c split-stdisp.c \ MAKE_EXPORTS=mod_tiling MODULE=mod_tiling +MODULE_STUB=mod_tiling.lua ###################################### diff --git a/mod_tiling/mod_tiling.lua b/mod_tiling/mod_tiling.lua new file mode 100644 index 0000000..428c3f6 --- /dev/null +++ b/mod_tiling/mod_tiling.lua @@ -0,0 +1,36 @@ +-- +-- ion/mod_menu/mod_tiling.lua -- Tiling module stub loader +-- +-- Copyright (c) Tuomo Valkonen 2004-2007. +-- +-- Ion is free software; you can redistribute it and/or modify it under +-- the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation; either version 2.1 of the License, or +-- (at your option) any later version. +-- + +-- This is a slight abuse of the package.loaded variable perhaps, but +-- library-like packages should handle checking if they're loaded instead of +-- confusing the user with require/include differences. +if package.loaded["mod_tiling"] then return end + +if not ioncore.load_module("mod_tiling") then + return +end + + +-- Change default layout +if ioncore.getlayout("default")==ioncore.getlayout("empty") then + ioncore.deflayout("default", { + managed = { + { + type = "WTiling", + bottom = true, + } + } + }) +end + + +-- Mark ourselves loaded. +package.loaded["mod_tiling"]=true diff --git a/mod_tiling/ops.c b/mod_tiling/ops.c index 4836552..6ec45e4 100644 --- a/mod_tiling/ops.c +++ b/mod_tiling/ops.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include @@ -17,39 +18,42 @@ #include "tiling.h" +/*{{{ mkbottom */ + + static WRegion *mkbottom_fn(WWindow *parent, const WFitParams *fp, void *param) { - WRegion *reg=(WRegion*)param; + WRegion *reg=(WRegion*)param, *res; + WRegionAttachData data; WTiling *tiling; - WSplitRegion *node=NULL; + WFitParams fp2; - if(!region_fitrep(reg, parent, fp)) - return NULL; + fp2.mode=REGION_FIT_EXACT; + fp2.g=fp->g; - tiling=create_tiling(parent, fp, NULL, FALSE); + tiling=create_tiling(parent, &fp2, NULL, FALSE); if(tiling==NULL) return NULL; - - node=create_splitregion(®ION_GEOM(tiling), reg); - if(node!=NULL){ - tiling->split_tree=(WSplit*)node; - tiling->split_tree->ws_if_root=tiling; - - region_detach_manager(reg); - if(tiling_managed_add(tiling, reg)) - return (WRegion*)tiling; - - #warning "TODO: reattach?" - - destroy_obj((Obj*)tiling->split_tree); - tiling->split_tree=NULL; - } + data.type=REGION_ATTACH_REPARENT; + data.u.reg=reg; - destroy_obj((Obj*)tiling); - return NULL; + /* Warning! Potentially dangerous call to remove a `reg` from the same + * group we're being attached to, and from the attach routine of which + * this function is called from! + */ + res=region_attach_helper((WRegion*)tiling, parent, &fp2, + (WRegionDoAttachFn*)tiling_do_attach_initial, + NULL, &data); + + if(res==NULL){ + destroy_obj((Obj*)tiling); + return NULL; + } + + return (WRegion*)tiling; } @@ -63,14 +67,13 @@ bool mod_tiling_mkbottom(WRegion *reg) WGroup *grp=REGION_MANAGER_CHK(reg, WGroup); WGroupAttachParams ap=GROUPATTACHPARAMS_INIT; WRegionAttachData data; - WRegion *tiling; if(grp==NULL){ warn(TR("Not member of a group")); return FALSE; } - if(grp->bottom!=NULL){ + if(group_bottom(grp)!=NULL){ warn(TR("Manager group already has bottom")); return FALSE; } @@ -90,6 +93,74 @@ bool mod_tiling_mkbottom(WRegion *reg) data.u.n.fn=mkbottom_fn; data.u.n.param=reg; - /* kele... poisto samalla kuin attach */ + /* See the "Warning!" above. */ return (group_do_attach(grp, &ap, &data)!=NULL); } + + +/*}}}*/ + + +/*{{{ untile */ + + +/*EXTL_DOC + * If \var{tiling} is managed by some group, float the frames in + * the tiling in that group, and dispose of \var{tiling}. + */ +EXTL_EXPORT +bool mod_tiling_untile(WTiling *tiling) +{ + WGroup *grp=REGION_MANAGER_CHK(tiling, WGroup); + WGroupAttachParams param=GROUPATTACHPARAMS_INIT; + WTilingIterTmp tmp; + WRegion *reg, *reg2; + + if(grp==NULL){ + warn(TR("Not member of a group")); + return FALSE; + } + + if(group_bottom(grp)==(WRegion*)tiling) + group_set_bottom(grp, NULL); + + /* Setting `batchop` will stop `tiling_managed_remove` from + * resizing remaining frames into freed space. It will also + * stop the tiling from being destroyed by actions of + * `tiling_managed_disposeroot`. + */ + tiling->batchop=TRUE; + + FOR_ALL_MANAGED_BY_TILING(reg, tiling, tmp){ + WRegionAttachData data; + + /* Don't bother with the status display */ + if(reg==TILING_STDISP_OF(tiling)) + continue; + + /* Don't bother with regions containing no client windows. */ + if(!region_rescue_needed(reg)) + continue; + + data.type=REGION_ATTACH_REPARENT; + data.u.reg=reg; + + param.geom_set=TRUE; + param.geom=REGION_GEOM(reg); + + reg2=group_do_attach(grp, ¶m, &data); + + if(reg2==NULL) + warn(TR("Unable to move a region from tiling to group.")); + } + + tiling->batchop=FALSE; + + region_dispose((WRegion*)tiling); + + return TRUE; +} + + +/*}}}*/ + diff --git a/mod_tiling/split.c b/mod_tiling/split.c index c3edc5e..381bbb3 100644 --- a/mod_tiling/split.c +++ b/mod_tiling/split.c @@ -1029,6 +1029,7 @@ err: void splittree_changeroot(WSplit *root, WSplit *node) { WTiling *ws=(WTiling*)(root->ws_if_root); + assert(ws!=NULL); assert(ws->split_tree==root); root->ws_if_root=NULL; diff --git a/mod_tiling/tiling.c b/mod_tiling/tiling.c index 159f001..bbefef7 100644 --- a/mod_tiling/tiling.c +++ b/mod_tiling/tiling.c @@ -48,10 +48,6 @@ static WTilingIterTmp tiling_iter_default_tmp; /*{{{ Some helper routines */ -#define STDISP_OF(WS) \ - ((WS)->stdispnode!=NULL ? (WS)->stdispnode->regnode.reg : NULL) - - static WSplitRegion *get_node_check(WTiling *ws, WRegion *reg) { WSplitRegion *node; @@ -266,13 +262,6 @@ Window tiling_xwindow(const WTiling *ws) } -/* -WRegion *tiling_rqclose_propagate(WTiling *ws, WRegion *maybe_sub) -{ - return (region_rqclose((WRegion*)ws, FALSE) ? (WRegion*)ws : NULL); -} -*/ - WPHolder *tiling_prepare_manage_transient(WTiling *ws, const WClientWin *transient, const WManageParams *param, @@ -500,7 +489,7 @@ bool tiling_managed_add_default(WTiling *ws, WRegion *reg) Window bottom=None, top=None; WFrame *frame; - if(STDISP_OF(ws)!=reg){ + if(TILING_STDISP_OF(ws)!=reg){ if(!ptrlist_insert_last(&(ws->managed_list), reg)) return FALSE; } @@ -535,30 +524,25 @@ bool tiling_managed_add(WTiling *ws, WRegion *reg) } -static WRegion *create_initial_frame(WTiling *ws, WWindow *parent, - const WFitParams *fp) +bool tiling_do_attach_initial(WTiling *ws, WRegion *reg) { - WRegion *reg=ws->create_frame_fn(parent, fp); - - if(reg==NULL) - return NULL; + assert(ws->split_tree==NULL); + + ws->split_tree=(WSplit*)create_splitregion(®ION_GEOM(reg), reg); + if(ws->split_tree==NULL) + return FALSE; - ws->split_tree=(WSplit*)create_splitregion(&(fp->g), reg); - if(ws->split_tree==NULL){ - destroy_obj((Obj*)reg); - return NULL; - } ws->split_tree->ws_if_root=ws; if(!tiling_managed_add(ws, reg)){ - destroy_obj((Obj*)reg); destroy_obj((Obj*)ws->split_tree); - return NULL; + ws->split_tree=NULL; + return FALSE; } - - return reg; + + return TRUE; } - + static WRegion *create_frame_tiling(WWindow *parent, const WFitParams *fp) { @@ -575,7 +559,8 @@ bool tiling_init(WTiling *ws, WWindow *parent, const WFitParams *fp, : create_frame_tiling); ws->stdispnode=NULL; ws->managed_list=NULL; - + ws->batchop=FALSE; + ws->dummywin=XCreateWindow(ioncore_g.dpy, parent->win, fp->g.x, fp->g.y, 1, 1, 0, CopyFromParent, InputOnly, @@ -589,7 +574,18 @@ bool tiling_init(WTiling *ws, WWindow *parent, const WFitParams *fp, REGION_PLEASE_WARP); if(ci){ - if(create_initial_frame(ws, parent, fp)==NULL){ + WRegionAttachData data; + WRegion *res; + + data.type=REGION_ATTACH_NEW; + data.u.n.fn=(WRegionCreateFn*)ws->create_frame_fn; + data.u.n.param=NULL; + + res=region_attach_helper((WRegion*)ws, parent, fp, + (WRegionDoAttachFn*)tiling_do_attach_initial, + NULL, &data); + + if(res==NULL){ XDestroyWindow(ioncore_g.dpy, ws->dummywin); return FALSE; } @@ -648,44 +644,30 @@ void tiling_deinit(WTiling *ws) } -bool tiling_managed_may_destroy(WTiling *ws, WRegion *reg) +WRegion *tiling_managed_disposeroot(WTiling *ws, WRegion *reg) { WTilingIterTmp tmp; WRegion *mgd; - - FOR_ALL_MANAGED_BY_TILING(mgd, ws, tmp){ - if(mgd!=STDISP_OF(ws) && mgd!=reg){ - return TRUE; - } - } - return region_manager_allows_destroying((WRegion*)ws); -} - - -bool tiling_may_destroy(WTiling *ws, WRegion *reg) -{ - WTilingIterTmp tmp; - WRegion *mgd; + if(ws->batchop) + return reg; FOR_ALL_MANAGED_BY_TILING(mgd, ws, tmp){ - if(mgd!=STDISP_OF(ws)){ - warn(TR("Workspace not empty - refusing to destroy.")); - return FALSE; - } + if(mgd!=TILING_STDISP_OF(ws) && mgd!=reg) + return reg; } - return TRUE; + return region_disposeroot((WRegion*)ws); } -bool tiling_rescue_clientwins(WTiling *ws, WPHolder *ph) +bool tiling_rescue_clientwins(WTiling *ws, WRescueInfo *info) { WTilingIterTmp tmp; ptrlist_iter_init(&tmp, ws->managed_list); - return region_rescue_some_clientwins((WRegion*)ws, ph, + return region_rescue_some_clientwins((WRegion*)ws, info, (WRegionIterator*)ptrlist_iter, &tmp); } @@ -693,7 +675,7 @@ bool tiling_rescue_clientwins(WTiling *ws, WPHolder *ph) void tiling_do_managed_remove(WTiling *ws, WRegion *reg) { - if(STDISP_OF(ws)==reg){ + if(TILING_STDISP_OF(ws)==reg){ ws->stdispnode->regnode.reg=NULL; }else{ ptrlist_remove(&(ws->managed_list), reg); @@ -711,30 +693,49 @@ static bool nostdispfilter(WSplit *node) void tiling_managed_remove(WTiling *ws, WRegion *reg) { - bool ds=OBJ_IS_BEING_DESTROYED(ws); bool act=REGION_IS_ACTIVE(reg); bool mcf=region_may_control_focus((WRegion*)ws); WSplitRegion *node=get_node_check(ws, reg); - WRegion *other; + bool norestore=(OBJ_IS_BEING_DESTROYED(ws) || ws->batchop); + WRegion *other=NULL; - other=tiling_do_navi_next(ws, reg, REGION_NAVI_ANY, TRUE, FALSE); + if(!norestore) + other=tiling_do_navi_next(ws, reg, REGION_NAVI_ANY, TRUE, FALSE); tiling_do_managed_remove(ws, reg); if(node==(WSplitRegion*)(ws->stdispnode)) ws->stdispnode=NULL; - if(node==NULL) - return; - - splittree_remove((WSplit*)node, (!ds && other!=NULL)); - - if(!ds){ - if(other==NULL) - region_dispose((WRegion*)ws, mcf); - else if(act && mcf) - region_warp(other); + if(node!=NULL){ + bool reused=FALSE; + + if(other==NULL && !norestore){ + WWindow *par=REGION_PARENT(ws); + WFitParams fp; + + assert(par!=NULL); + + fp.g=node->split.geom; + fp.mode=REGION_FIT_EXACT; + + other=(ws->create_frame_fn)(par, &fp); + + if(other!=NULL){ + node->reg=other; + tiling_managed_add(ws, other); + reused=TRUE; + }else{ + warn(TR("Tiling in useless state.")); + } + } + + if(!reused) + splittree_remove((WSplit*)node, (!norestore && other!=NULL)); } + + if(!norestore && other!=NULL && act && mcf) + region_warp(other); } @@ -1086,24 +1087,45 @@ WFrame *tiling_split_at(WTiling *ws, WFrame *frame, const char *dirstr, } -/*EXTL_DOC - * Try to relocate regions managed by \var{frame} to another frame - * and, if possible, destroy the frame. - */ -EXTL_EXPORT_MEMBER -bool tiling_unsplit_at(WTiling *ws, WFrame *frame) +void do_unsplit(WRegion *reg) { - if(frame==NULL){ - warn(TR("Nil frame.")); - return FALSE; + WTiling *ws=REGION_MANAGER_CHK(reg, WTiling); + WPHolder *ph; + bool res; + + if(ws==NULL) + return; + + ph=region_get_rescue_pholder_for((WRegion*)ws, reg); + + if(ph==NULL){ + res=!region_rescue_needed(reg); + }else{ + res=region_rescue(reg, ph); + destroy_obj((Obj*)ph); } - if(REGION_MANAGER(frame)!=(WRegion*)ws){ - warn(TR("The frame is not managed by the workspace.")); - return FALSE; + if(!res){ + warn(TR("Unable to unsplit: Could not move client windows " + "elsewhere within the tiling.")); + return; } - return region_rqclose((WRegion*)frame, TRUE); + destroy_obj((Obj*)reg); +} + + +/*EXTL_DOC + * Try to relocate regions managed by \var{reg} to another frame + * and, if possible, destroy it. + */ +EXTL_EXPORT_MEMBER +void tiling_unsplit_at(WTiling *ws, WRegion *reg) +{ + if(reg==NULL || REGION_MANAGER(reg)!=(WRegion*)ws) + return; + + mainloop_defer_action((Obj*)reg, (WDeferredAction*)do_unsplit); } @@ -1716,11 +1738,8 @@ static DynFunTab tiling_dynfuntab[]={ {(DynFun*)region_get_configuration, (DynFun*)tiling_get_configuration}, - {(DynFun*)region_managed_may_destroy, - (DynFun*)tiling_managed_may_destroy}, - - {(DynFun*)region_may_destroy, - (DynFun*)tiling_may_destroy}, + {(DynFun*)region_managed_disposeroot, + (DynFun*)tiling_managed_disposeroot}, {(DynFun*)region_current, (DynFun*)tiling_current}, diff --git a/mod_tiling/tiling.h b/mod_tiling/tiling.h index 7d93469..31abe91 100644 --- a/mod_tiling/tiling.h +++ b/mod_tiling/tiling.h @@ -20,6 +20,7 @@ #include #include #include +#include #include "split.h" @@ -31,6 +32,7 @@ DECLCLASS(WTiling){ PtrList *managed_list; WRegionSimpleCreateFn *create_frame_fn; Window dummywin; + bool batchop; }; @@ -41,6 +43,8 @@ extern WTiling *create_tiling(WWindow *parent, const WFitParams *fp, extern WTiling *create_tiling_simple(WWindow *parent, const WFitParams *fp); extern void tiling_deinit(WTiling *ws); +extern bool tiling_do_attach_initial(WTiling *tiling, WRegion *reg); + extern ExtlTab tiling_resize_tree(WTiling *ws, WSplit *node, ExtlTab g); extern WRegion *tiling_current(WTiling *ws); @@ -51,7 +55,7 @@ extern WRegion *tiling_region_at(WTiling *ws, int x, int y); extern WFrame *tiling_split_top(WTiling *ws, const char *dirstr); extern WFrame *tiling_split_at(WTiling *ws, WFrame *frame, const char *dirstr, bool attach_current); -extern bool tiling_unsplit_at(WTiling *ws, WFrame *frame); +extern void tiling_unsplit_at(WTiling *ws, WRegion *reg); extern WSplitSplit *tiling_set_floating(WTiling *ws, WSplitSplit *split, int sp); @@ -85,12 +89,11 @@ extern void tiling_managed_rqgeom(WTiling *ws, WRegion *reg, WRectangle *geomret); extern void tiling_managed_remove(WTiling *ws, WRegion *reg); extern void tiling_managed_activated(WTiling *ws, WRegion *reg); -extern bool tiling_rescue_clientwins(WTiling *ws, WPHolder *ph); +extern bool tiling_rescue_clientwins(WTiling *ws, WRescueInfo *ph); extern WPHolder *tiling_get_rescue_pholder_for(WTiling *ws, WRegion *mgd); extern void tiling_do_set_focus(WTiling *ws, bool warp); extern bool tiling_managed_prepare_focus(WTiling *ws, WRegion *reg, int flags, WPrepareFocusResult *res); -extern bool tiling_managed_may_destroy(WTiling *ws, WRegion *reg); extern void tiling_manage_stdisp(WTiling *ws, WRegion *stdisp, const WMPlexSTDispInfo *di); extern void tiling_unmanage_stdisp(WTiling *ws, bool permanent, bool nofocus); @@ -123,5 +126,10 @@ typedef PtrListIterTmp WTilingIterTmp; #define FOR_ALL_MANAGED_BY_TILING_UNSAFE(VAR, WS) \ FOR_ALL_ON_PTRLIST_UNSAFE(WRegion*, VAR, (WS)->managed_list) +/* Misc. */ + +#define TILING_STDISP_OF(WS) \ + ((WS)->stdispnode!=NULL ? (WS)->stdispnode->regnode.reg : NULL) + #endif /* ION_MOD_TILING_TILING_H */ diff --git a/pwm/cfg_pwm.lua b/pwm/cfg_pwm.lua index ca01137..805daf0 100644 --- a/pwm/cfg_pwm.lua +++ b/pwm/cfg_pwm.lua @@ -81,11 +81,22 @@ defmenu("mainmenu", { menuentry("Lock screen", "ioncore.exec_on(_, 'xlock')"), menuentry("Help", "ioncore.exec_on(_, ':man pwm3')"), submenu("Workspaces", "wsmenu"), - menuentry("New", "ioncore.create_ws(_)"), submenu("Styles", "stylemenu"), submenu("Session", "sessionmenu"), }) +-- Application menu +defmenu("appmenu", { + menuentry("XTerm", "ioncore.exec_on(_, 'xterm')"), + menuentry("W3M", "ioncore.exec_on(_, ':w3m -v')"), + menuentry("Rxvt", "ioncore.exec_on(_, 'rxvt')"), + menuentry("Opera", "ioncore.exec_on(_, 'opera')"), + menuentry("Links", "ioncore.exec_on(_, ':links')"), + menuentry("Konqueror", "ioncore.exec_on(_, 'konqueror')"), + menuentry("Dillo", "ioncore.exec_on(_, 'dillo')"), + menuentry("Run...", "mod_query.query_exec(_)"), +}) + -- Workspace menu defmenu("wsmenu", { menuentry("New", "ioncore.create_ws(_)"), diff --git a/pwm/pwm.c b/pwm/pwm.c index bbb042f..c4a0804 100644 --- a/pwm/pwm.c +++ b/pwm/pwm.c @@ -76,7 +76,7 @@ static OptParserOpt pwm_opts[]={ static void help() { int i; - printf(TR("Usage: %s [options]\n\n"), prog_execname()); + printf(TR("Usage: %s [options]\n\n"), libtu_progname()); for(i=0; pwm_opts[i].descr!=NULL; i++) pwm_opts[i].descr=TR(pwm_opts[i].descr); optparser_printhelp(OPTP_MIDLONG, pwm_opts); @@ -188,7 +188,7 @@ fail: fclose(ef); pid=fork(); if(pid==0){ - ioncore_setup_environ(DefaultScreen(ioncore_g.dpy)); + ioncore_setup_display(DefaultScreen(ioncore_g.dpy)); if(!may_continue) XCloseDisplay(ioncore_g.dpy); else diff --git a/system.mk b/system.mk index e091318..c6165a7 100644 --- a/system.mk +++ b/system.mk @@ -81,13 +81,14 @@ X11_PREFIX=/usr/X11R6 X11_LIBS=-L$(X11_PREFIX)/lib -lX11 -lXext X11_INCLUDES=-I$(X11_PREFIX)/include -# XFree86 libraries up to 4.3.0 have a bug that will cause Ion to segfault -# if Opera is used when i18n support is enabled. The following setting -# should work around that situation. +# XFree86 libraries up to 4.3.0 have a bug that can cause a segfault. +# The following setting should work around that situation. DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND -# Use the Xutf8 routines (XFree86 extension) instead of Xmb routines in -# an UTF8 locale. +# Use the Xutf8 routines (XFree86 extension) instead of the Xmb routines +# in an UTF-8 locale. (No, you don't need this in UTF-8 locales, and +# most likely don't even want. It's only there because both Xmb and +# Xutf8 routines are broken, in different ways.) #DEFINES += -DCF_DE_USE_XUTF8 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this @@ -105,7 +106,6 @@ DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND # in sprintf_2.2/ is used. #HAS_SYSTEM_ASPRINTF=1 - # If you're on an archaic system (such as relatively recent *BSD releases) # without even dummy multibyte/widechar and localisation support, you may # have to uncomment the following line: diff --git a/utils/ion-completeman.in b/utils/ion-completeman.in index 9f71f83..969839b 100644 --- a/utils/ion-completeman.in +++ b/utils/ion-completeman.in @@ -1,11 +1,14 @@ #!/bin/sh +prog=$0 tocompl="" section="" beg="" action="" usercache="" syscache="" +linebeg="^" +icase="" translate_grepsafe() { # The regexp below is supposed to be [\[\].*$^\\], but sed sucks @@ -15,30 +18,46 @@ translate_grepsafe() { sed 's:^[ \t]*\(.*\)[ \t]*$:\1:; s:[[.[.][.].].*$^\\]:\\&:g' } -case "$1" in - -complete) - read section tocompl << EOF + +while test $# -ge 1; do + case "$1" in + -mid) + linebeg="" + ;; + -icase) + icase="-i" + ;; + -complete) + read section tocompl << EOF $2 EOF - if test "$tocompl" = ""; then - tocompl="$section" - section="" - else - beg="$section " - fi - tocompl=`echo "$tocompl" | translate_grepsafe` - action="complete" - ;; - -mkusercache) - action="mkusercache" - ;; - -mksyscache) - action="mksyscache" - ;; -esac - + if test "$tocompl" = ""; then + tocompl="$section" + section="" + else + beg="$section " + fi + tocompl=`echo "$tocompl" | translate_grepsafe` + action="complete" + break + ;; + -mkusercache) + action="mkusercache" + break + ;; + -mksyscache) + action="mksyscache" + break + ;; + *) + break + ;; + esac + shift +done + if test "x$action" = x; then - echo 2>&1 "Usage: $0 (-complete what|-mkusercache|-mksyscache)" + echo 2>&1 "Usage: $prog [-icase] [-mid] (-complete what|-mkusercache|-mksyscache)" exit 1 fi @@ -58,7 +77,7 @@ grepper() { if test "$section" = ""; then section="[0-9]" fi - grep "^$tocompl.*\.$section" + grep $icase "$linebeg$tocompl.*\.$section" fi } diff --git a/version.h b/version.h index 4688aae..31b30f5 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ -#define ION_VERSION "3ds-20070203" +#define ION_VERSION "3ds-20070318" #define ION_API_VERSION "3-"ION_VERSION