Hi all,

 Some weeks ago it was a conversation about how e17 does smart
maximization of  a window.
 It was proposed to introduce some user defined configuration options,
to let e17 to know the area of the desktop
 it can use for  maximization. However, I think, Rasterman proposed
much better solution. The idea was, that each gadget
 should hint if it allows to maximize over it.

 Please find the *.tar.gz archive attached. Also this archive can be
found via the following link :
http://rose.inf.unibz.it/~struk/e17/e.patch.tar.gz.
 This archive contains some patches to e and e_modules.

 First it touches e itself. It introduces
E_GADMAN_POLICY_ALLOW_OVERLAP flag.  This flag can be used to set the
way gadget influences the maximization of a border. Second, it patches
all the standard E modules ( battery, cpufreq, start, etc ) and
introduces a configuration menu option which allows to set
E_GADMAN_POLICY_ALLOW_OVERLAP flag.

 If E_GADMAN_POLICY_ALLOW_OVERLAP flag is set for the gadget, then the
gadget is not taken into account when the maximized border computed.
And vice versa, if it is not set
 the gadget is taken into account computing maximized border. The
following code shows how this option can be set/unset:

 E_Gadman_Policy pol;
 ...
 pol = .... ;

 if( gadget->conf->allow_overlap == 0 )
    pol &= ~E_GADMAN_POLICY_ALLOW_OVERLAP;
 else
    pol |= E_GADMAN_POLICY_ALLOW_OVERLAP;

 e_gadman_client_policy_set( face->gmc, pol );
 ...

 Please refer to the modules code, after applying the patch, to see
how things really works ::))

Furthermore, the archive contains two files : e_mod_config.c and
e_mod_config.h for the
start module. This two files implements the configuration dialog of
the start module.

 Finally, the archive contains some patches for extra modules in
e_modules. The 'calendar' and the 'monitor' modules are
 patched to support the mechanizm described above.

 As a conclusion, I think, this patch partialy solves the 4th case of
the maximization TODO.

 Thanks
 Aleksej

Attachment: e.patch.tar.gz
Description: GNU Zip compressed data

Reply via email to