ignore borders when doing FocusLeft, etc.

This commit is contained in:
markt 2007-02-28 21:29:58 +00:00
parent ec9cd21dda
commit a0944a02cd
5 changed files with 8 additions and 8 deletions

View file

0
src/FbTk/SearchResult.cc Normal file
View file

0
src/FbTk/SearchResult.hh Normal file
View file

0
src/FbTk/TypeAhead.hh Normal file
View file

View file

@ -275,10 +275,10 @@ void FocusControl::dirFocus(FluxboxWindow &win, FocusDir dir) {
FluxboxWindow *foundwin = 0; FluxboxWindow *foundwin = 0;
int weight = 999999, exposure = 0; // extreme values int weight = 999999, exposure = 0; // extreme values
int borderW = m_screen.winFrameTheme().border().width(), int borderW = m_screen.winFrameTheme().border().width(),
top = win.y(), top = win.y() + borderW,
bottom = win.y() + win.height() + 2*borderW, bottom = win.y() + win.height() + borderW,
left = win.x(), left = win.x() + borderW,
right = win.x() + win.width() + 2*borderW; right = win.x() + win.width() + borderW;
Workspace::Windows &wins = m_screen.currentWorkspace()->windowList(); Workspace::Windows &wins = m_screen.currentWorkspace()->windowList();
Workspace::Windows::iterator it = wins.begin(); Workspace::Windows::iterator it = wins.begin();
@ -292,12 +292,12 @@ void FocusControl::dirFocus(FluxboxWindow &win, FocusDir dir) {
// we check things against an edge, and within the bounds (draw a picture) // we check things against an edge, and within the bounds (draw a picture)
int edge=0, upper=0, lower=0, oedge=0, oupper=0, olower=0; int edge=0, upper=0, lower=0, oedge=0, oupper=0, olower=0;
int otop = (*it)->y(), int otop = (*it)->y() + borderW,
// 2 * border = border on each side // 2 * border = border on each side
obottom = (*it)->y() + (*it)->height() + 2*borderW, obottom = (*it)->y() + (*it)->height() + borderW,
oleft = (*it)->x(), oleft = (*it)->x() + borderW,
// 2 * border = border on each side // 2 * border = border on each side
oright = (*it)->x() + (*it)->width() + 2*borderW; oright = (*it)->x() + (*it)->width() + borderW;
// check if they intersect // check if they intersect
switch (dir) { switch (dir) {