add session.ignoreBorder to ignore border for movement events

This commit is contained in:
rathnor 2003-05-04 16:55:40 +00:00
parent cd3379270b
commit b10dc8434b
5 changed files with 26 additions and 8 deletions

View file

@ -1,6 +1,8 @@
(Format: Year/Month/Day)
Changes for 0.9.2:
*03/05/04:
* add session.ignoreBorder - ignores window border with movement (Simon)
fluxbox.hh/cc Window.cc
* Fix warping with multiple screens (Simon)
Window.cc
* Set many key events/commands to act on the screen the mouse is on,

View file

@ -99,20 +99,20 @@ Bugfixes/lower priority:
Release: 0.9.2
Approx Date: 5 May, 2003
Major Features:
+ Integration of Remember patch (Simon)
* Integration of Remember patch (Simon)
* Transparency (Henrik)
Minor Features:
- more keybinding actions (Both)
* directional focus movement (Simon)
- fix up focus issues (Simon)
= fix up focus issues (Simon)
* snap to windows (Simon)
- improved command-line help option (Henrik)
= pixmap buttons (Henrik)
+ Shaped menu/slit/toolbar (Henrik)
Bugfixes/lower priority:
- Bugs from 0.9.1 (Both)
- stop window moving from borders (Simon)
- Focus acts sloppy on window close/warp (Simon)
* stop window moving from borders (Simon)
= Focus acts sloppy on window close/warp (Simon)
----------------------------------------------------------
Release: 0.9.3
@ -121,6 +121,7 @@ Major Features:
- Xinerama (Simon)
- XRandr (Henrik)
Minor Features:
- Add some sort of program launch function (Simon)
- more powerful autogroup matching (?)
- nls updating (layers, toolbar) (Both)
Bugfixes/lower priority:

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Window.cc,v 1.157 2003/05/04 13:55:39 rathnor Exp $
// $Id: Window.cc,v 1.158 2003/05/04 16:55:40 rathnor Exp $
#include "Window.hh"
@ -2253,6 +2253,18 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
}
bool inside_titlebar = (m_frame.titlebar() == me.window || m_frame.label() == me.window ||
m_frame.handle() == me.window || m_frame.window() == me.window);
if (Fluxbox::instance()->getIgnoreBorder()
&& !(me.state & Mod1Mask) // really should check for exact matches
&& !(isMoving() || isResizing())) {
int borderw = screen.rootTheme().borderWidth();
if (me.x_root < (m_frame.x() + borderw) ||
me.y_root < (m_frame.y() + borderw) ||
me.x_root > (m_frame.x() + (int)m_frame.width() + borderw) ||
me.y_root > (m_frame.y() + (int)m_frame.height() + borderw))
return;
}
WinClient *client = 0;
if (!inside_titlebar) {
// determine if we're in titlebar

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: fluxbox.cc,v 1.126 2003/05/04 13:07:00 rathnor Exp $
// $Id: fluxbox.cc,v 1.127 2003/05/04 16:55:40 rathnor Exp $
#include "fluxbox.hh"
@ -365,6 +365,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
m_fbatoms(new FbAtoms()),
m_resourcemanager(), m_screen_rm(),
m_rc_tabs(m_resourcemanager, true, "session.tabs", "Session.Tabs"),
m_rc_ignoreborder(m_resourcemanager, false, "session.ignoreBorder", "Session.IgnoreBorder"),
m_rc_colors_per_channel(m_resourcemanager, 4,
"session.colorsPerChannel", "Session.ColorsPerChannel"),
m_rc_numlayers(m_resourcemanager, 13, "session.numLayers", "Session.NumLayers"),

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: fluxbox.hh,v 1.51 2003/04/27 04:28:04 rathnor Exp $
// $Id: fluxbox.hh,v 1.52 2003/05/04 16:55:40 rathnor Exp $
#ifndef FLUXBOX_HH
#define FLUXBOX_HH
@ -99,6 +99,8 @@ public:
enum FocusModel { SLOPPYFOCUS=0, SEMISLOPPYFOCUS, CLICKTOFOCUS };
inline const Bool getIgnoreBorder() const { return *m_rc_ignoreborder; }
inline const std::vector<Fluxbox::Titlebar>& getTitlebarRight() const { return *m_rc_titlebar_right; }
inline const std::vector<Fluxbox::Titlebar>& getTitlebarLeft() const { return *m_rc_titlebar_left; }
inline const std::string &getStyleFilename() const { return *m_rc_stylefile; }
@ -216,7 +218,7 @@ private:
ResourceManager m_resourcemanager, m_screen_rm;
//--- Resources
Resource<bool> m_rc_tabs;
Resource<bool> m_rc_tabs, m_rc_ignoreborder;
Resource<int> m_rc_colors_per_channel, m_rc_numlayers;
Resource<std::string> m_rc_stylefile,
m_rc_menufile, m_rc_keyfile, m_rc_slitlistfile,