Sun May 8 15:27:17 EDT 2005 Jason Lunz <[EMAIL PROTECTED]>
* extend maybe_leave_layer2 to handle passive l2fws
When using detach.lua with warp=false in ioncore.set and detach.passive =
true,
it could happen that a transient would pop up on layer2 and be dismissed by
keyboard without the mouse ever entering it. In this situation the focus does
not return to layer1 as it should.
This is fixed in this patch by making detach.maybe_leave_layer2() work for
both
active and passive l2fws.
Sun May 8 16:07:43 EDT 2005 Jason Lunz <[EMAIL PROTECTED]>
* detach.lua: conditionally disable pointer warp on l2 floatws
When using detach.lua to automatically manage transients with warp=true,
clicking on a list of download links in a web browser and hitting 'enter' for
each popup becomes much more difficult because each popup on the l2 floatws
warps the pointer away from the links. Warping to transients is annoying in
other situations, too.
This patch fixes that by disabling pointer warping for frames on a
detach-managed l2 floatws.
It could be much more sophisticated than it is, but this gets the job done for
now. A really good implementation might separate this from detach.lua
entirely,
and allow configuration of pointer warping via winprops or something.
gpg: Invalid passphrase; please try again ...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
New patches:
[extend maybe_leave_layer2 to handle passive l2fws
Jason Lunz <[EMAIL PROTECTED]>**20050508192717
When using detach.lua with warp=false in ioncore.set and detach.passive = true,
it could happen that a transient would pop up on layer2 and be dismissed by
keyboard without the mouse ever entering it. In this situation the focus does
not return to layer1 as it should.
This is fixed in this patch by making detach.maybe_leave_layer2() work for both
active and passive l2fws.
]
<
> {
hunk ./scripts/detach.lua 368
return false
end
+function startswith(s, target)
+ return string.sub(s, 0, string.len(target)) == target
+end
+
-- candidate for frame_managed_changed_hook.
hunk ./scripts/detach.lua 373
- --- If the action is a "remove", if the non passive layer 2 workspace
- --- is empty, close it.
- -function detach.maybe_leave_layer2(table)
- - if (table.mode == "remove") then
- - local fws = detach.find_ws(table.reg:screen_of(), false)
- - -- table.reg is not yet detached. See if it was managed by fws.
- - if fws and fws == table.reg:manager() then
- - local l = fws:managed_list()
- - local empty = true
- - -- hmm, there should be a better way to check emptyness :-\
- - for _, r in l do
- - -- Ah, if that's me, I'm just being removed. Doesn't count.
- - if r ~= table.reg then
- - -- ioncore.exec_on(table.reg, "echo r:name='"..r:name().."'")
- - empty = false
- - break
- - end
- - end
- - if empty then
- - -- debug.echo("empty XXXXX")
- - ioncore.defer(function ()
- - fws:screen_of():l2_set_hidden(fws, 'true')
- - end)
- - -- ioncore.defer(function () fws:rqclose(fws) end)
- - else
- - -- debug.echo("not empty YYY")
+--
+-- If the action is a "remove", and the layer 2 workspace is empty, hide it.
+-- This prevents an empty (and thus invisible) layer 2 floating workspace from
+-- having the focus after its last managed frame is closed, so that focus
+-- returns to layer 1.
+function detach.maybe_leave_layer2(tbl)
+ if tbl.mode == "remove" then
+ local mgr = tbl.reg:manager()
+ if startswith(mgr:name(), "layer 2 float - ") then
+ local l = mgr:managed_list()
+ -- The region will be empty if the only managed region is the one
+ -- currently being removed.
+ if table.getn(l) == 1 and l[1] == tbl.reg then
+ ioncore.defer(function () mgr:screen_of():l2_set_hidden(mgr, 'true') end)
end
end
end
}
[detach.lua: conditionally disable pointer warp on l2 floatws
Jason Lunz <[EMAIL PROTECTED]>**20050508200743
When using detach.lua to automatically manage transients with warp=true,
clicking on a list of download links in a web browser and hitting 'enter' for
each popup becomes much more difficult because each popup on the l2 floatws
warps the pointer away from the links. Warping to transients is annoying in
other situations, too.
This patch fixes that by disabling pointer warping for frames on a
detach-managed l2 floatws.
It could be much more sophisticated than it is, but this gets the job done for
now. A really good implementation might separate this from detach.lua entirely,
and allow configuration of pointer warping via winprops or something.
]
<
> {
hunk ./scripts/detach.lua 86
function detach.setup_hooks ()
ioncore.get_hook("clientwin_do_manage_alt"):add(detach.manager)
ioncore.get_hook("frame_managed_changed_hook"):add(detach.maybe_leave_layer2)
+ ioncore.get_hook("region_do_warp_alt"):add(detach.skip_l2_warp)
end
hunk ./scripts/detach.lua 192
return ws
end
+function startswith(s, target)
+ return string.sub(s, 0, string.len(target)) == target
+end
+
+function is_l2floatws(ws)
+ return startswith(ws:name(), "layer 2 float - ")
+end
+
-- send either the topmost transcient or the window itself if it has
-- no transcient to a floating workspace, on the second layer of the
-- screen.
hunk ./scripts/detach.lua 377
return false
end
- -function startswith(s, target)
- - return string.sub(s, 0, string.len(target)) == target
- -end
- -
-- candidate for frame_managed_changed_hook.
--
-- If the action is a "remove", and the layer 2 workspace is empty, hide it.
hunk ./scripts/detach.lua 386
function detach.maybe_leave_layer2(tbl)
if tbl.mode == "remove" then
local mgr = tbl.reg:manager()
- - if startswith(mgr:name(), "layer 2 float - ") then
+ if is_l2floatws(mgr) then
local l = mgr:managed_list()
-- The region will be empty if the only managed region is the one
-- currently being removed.
hunk ./scripts/detach.lua 395
end
end
end
+end
+
+function detach.skip_l2_warp(reg)
+ n = reg:manager():manager():name()
+ if is_l2floatws(reg:manager():manager()) then
+ return true
+ end
+ return false
end
}
Context:
[Added statusd_pytone.lua
Alexander Wirt <[EMAIL PROTECTED]>**20050508090549]
[Added framecycle.lua.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050505103045]
[more specific regexp in enumerate.lua
René van Bevern <[EMAIL PROTECTED]>**20050505071228]
[added look_atme and enumerate
[EMAIL PROTECTED]
[emacs-bindings.lua: C-x o => other-client, C-x x 2, C-x x 3 => floating splits
Matthieu Moy <[EMAIL PROTECTED]>**20050503063503]
[Clarified documentation for detach.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050503063432]
[use named optional arguments for zoom.lua
[EMAIL PROTECTED]
[zoom.lua general updates
Etan Reisner <[EMAIL PROTECTED]>**20050428085355
Fixed some warnings when either frame is empty, and added a bunch of customizability.
]
[statusd_laptopstatus.lua script for monitoring cpu & battery status
Jari Eskelinen <[EMAIL PROTECTED]>**20050427221554]
[Script for external program outputs in statusbar
Antti Vähäkotamäki <[EMAIL PROTECTED]>**20050409195622]
[zoom.lua - larswm-like zooming
[EMAIL PROTECTED]
[Added not on statusd scripts.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050406121047]
[Updated emacs-bindings.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050406080238]
[Use new toggle mechanism in detach.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050406080138]
[made changes to schedule, netmon and the prob rss_feed was having with some rss
[EMAIL PROTECTED]
[rss reader
[EMAIL PROTECTED]
[The behaviour of set_tabbar was recently changed, which broke any scripts using it. This patch repairs the min_tabs script.
[EMAIL PROTECTED]
The parameters of set_tabbar were in fact reverted. Thus, the usage of
it in the min_tabs script is now inverted as well.
]
[Added statusd_sysmon.lua.
Vladimir Chizhov <[EMAIL PROTECTED]>**20050331090241]
[made some changes to netmon,uptime,exec_show and schedule
[EMAIL PROTECTED]
[schedule messages for notifications
[EMAIL PROTECTED]
[Alphabetical order!
Tuomo Valkonen <[EMAIL PROTECTED]>**20050323212159]
[execute shell command and display result
[EMAIL PROTECTED]
[Changed min_tabs.lua for new toggle conventions and general cleanup.
[EMAIL PROTECTED]
[Cleaner code for min_tabs script.
[EMAIL PROTECTED]
[Fixed a couple of 'nill value' errors in detach.lua
Jeremy Hankins <[EMAIL PROTECTED]>**20050318205059]
[There's no statusd.update.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050319134430]
[rewritten the netmon
[EMAIL PROTECTED]
[Added note on Linux-specificty of many monitors.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050318162546]
[changed the output format of netmon a little.
Sadrul H C <imadil |at| gmail |dot| com>**20050318124423]
[Added link to changelog.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050318103500]
[network monitor for statusbar
Sadrul H C <imadil |at| gmail |dot| com>**20050318102903]
[Added note on sending email normally.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050314113722]
[statusd_uptime
Sadrul H C <imadil |at| gmail |dot| com>**20050313201123]
[More instruction changes.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050313153006]
[added statusd for mpd music player
James Rayner <[EMAIL PROTECTED]>**20050313151845]
[Shortened darcs instructions.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050313152504]
[Fix minor bug in detach.manager in detach.lua.
Jeremy Hankins <[EMAIL PROTECTED]>**20050310212021]
[Cleaner hooks and restricted mode management in detach.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050308225722]
[Updated min_tabs.lua to handle restricted mode.
Jeremy Hankins <[EMAIL PROTECTED]>**20050307184231]
[Added app.lua
Jeremy Hankins <[EMAIL PROTECTED]>**20050307021856]
[use ioncore.defer in detach.lua (needs the latest ion3 snapshot)
Matthieu Moy <[EMAIL PROTECTED]>**20050305183959]
[Many improvements and documentation for detach.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050303230043
There's now a hook to give back the focus to layer 1 when the last
layer2 object leaves it.
]
[Updated look_cleansteel.lua.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050220151234]
[Moved go_frame_or_desk.lua up.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050220150918]
[port of go_frame_or_desk.lua to ion3
[EMAIL PROTECTED]
[Layer 2 WFloatWS passive by default, detach.close_floatws added in detach.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050219082604]
[detach.lua now manages the scratchpad and layer2 WFloatWS
Matthieu Moy <[EMAIL PROTECTED]>**20050217082148
I guess my code would need being reviewed and improved. In particular,
there are still some focus problems as mentionned on the mailing list.
]
[Added nest-ws.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050216064820]
[Added look-moy, unstriked detach.lua
Matthieu Moy <[EMAIL PROTECTED]>**20050216064100
detach.lua worked unchanged for me. Just updated the comments.
]
[Updated emacs-bindings.lua for ion3
Matthieu Moy <[EMAIL PROTECTED]>**20050216052834]
[Updated collapse.lua.
Matthieu MOY <[EMAIL PROTECTED]>**20050215183754]
[Improved min_tabs for ion3 20050211 and later
Cas Cremers <[EMAIL PROTECTED]>**20050215113556
- Corrected min_tabs to work with current svn versions of ion3
- Changed behaviour: Frames with no window will have a tab bar. This
will make sure empty frames are visible in all visual styles.
]
[Fixed anchor tag.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050214162608]
[Create per-cwin scratchpads.
Etan Reisner <[EMAIL PROTECTED]>**20050214160232]
[Added nextact.lua.
Tuomo Valkonen <[EMAIL PROTECTED]>**20050206101747]
[iw_info_min_changed_toreturn_space_insteadof_empty_string
[EMAIL PROTECTED]
* changed iw_info_min to return a space instead of empty string
when no interface is present in /proc/wireless/info. Otherwise
old info lingers in the status bar. Perhaps it should be
changed at the receiving end so that an empty string should
clear the meter status bar info.
]
[Instructions improvements.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041108085426]
[Update statusd_iw_info_min.lua
Etan Reisner <[EMAIL PROTECTED]>**20041108055353
Fix to make it work with more (all?) configurations. It now accepts = as well as : as the separator.
Also export each of the pieces of information so that they can be chosen individually as well as all together.
]
[Fixed conflicts in previous merge.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041107182149]
[added look_bas.lua
[EMAIL PROTECTED]
[Added link to installation instructions/binary page in DarcsWiki.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041106094134]
[Updated darcs links.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041106092311]
[Some reorganisation.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041106090523]
[statusbar_cpu_batt_network_info
[EMAIL PROTECTED]
[Added wcirculate.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041104121406]
[simple gold/red style to work with the min_tabs.lua modification
[EMAIL PROTECTED]
[script to show tabs on ion frames only when necessary
David Tweed <[EMAIL PROTECTED]>**20041019201215]
[Oops. Wrong URL.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041005005857]
[Changed repo address.
Tuomo Valkonen <[EMAIL PROTECTED]>**20041005005006]
[Over-striked entries (all of them) that have not been updated
Tuomo Valkonen <[EMAIL PROTECTED]>**20041003212019
from Ion2 to Ion3.
]
[TAG Branched Ion3 scripts repository
Tuomo Valkonen <[EMAIL PROTECTED]>**20041003204900]
Patch bundle hash:
eed0ba053e081ccf191c87a99d788b16d3119a6d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCfnQZaDU3zTAC0GcRAsAZAKCvFOZziBqUHgjQC8cMQEYHUYMvdwCgmHmR
VegYAMKj5pOHyvPFdQXdhuI=
=Yugh
-----END PGP SIGNATURE-----