|
From: <e...@pe...> - 2012-05-04 12:11:30
|
Hello,
This patch is against debian testing e17 0.16.999.55115-1. I was just
trying to see if I could get e17 to behave like the WindowMaker I have
used daily for over a decade, there's just this specific behavior I was
unable to reproduce in settings alone without hacking the code.
In WindowMaker you can focus and resize windows without raising them,
you can also click and interact with an obscured window that is focused
without raising it. You do this with alt-right-click on an obscured
window. If you hold the click and motion, you focus and resize the window
without raising it. If you simply release instead of hold and motion, you
focus without raising the window and no resize occurs.
I use this very often, as it's convenient for interacting with obscured
debugger consoles and xterms while I have the interesting windows
containing program output raised and occupying most of my display.
This is a quick and dirty hack, it uses knowledge of RESIZE_NONE being
defined to 11 which appears intended to be private to e_border.c
currently. I'm just putting this out there in case anyone else would
appreciate this behavior. I think it would be nice to get a toggle in
e17 to activate this mode, it's one of the best things about
WindowMaker's click to focus implementation and a big part of why I've
used it exclusively for so long.
No testing has been done to see if this change interacts badly with
modes other than click to focus. It reproduces exactly the WindowMaker
behavior in my limited testing, without any observed ill effects.
Regards,
Vito Caputo
--- e_focus.c.orig 2012-05-04 06:09:40.000000000 -0500
+++ e_focus.c 2012-05-04 06:48:57.000000000 -0500
@@ -85,16 +85,16 @@
{
if (e_config->focus_policy == E_FOCUS_CLICK)
{
+ if (!bd->lock_user_stacking)
+ {
+ if (e_config->border_raise_on_focus && bd->resize_mode == 11 && !bd->focused)
+ e_border_raise(bd);
+ }
if (!bd->lock_focus_out)
{
if (!bd->focused)
e_border_focus_set(bd, 1, 1);
}
- if (!bd->lock_user_stacking)
- {
- if (e_config->border_raise_on_focus)
- e_border_raise(bd);
- }
}
else if (e_config->always_click_to_raise)
{
|