focus fixes
This commit is contained in:
parent
7a20120bbc
commit
f68c15cfa2
3 changed files with 29 additions and 24 deletions
|
@ -1,6 +1,9 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 0.9.6:
|
||||
*03/09/14:
|
||||
* Focus fixes (Simon)
|
||||
Hopefully fixes mysterious instances of focus not being set right.
|
||||
Window.cc fluxbox.cc
|
||||
* More optimization to reduce flicker in titlebar
|
||||
Screen.cc, FbWinFrame.cc/hh, TextButton.hh/cc, FbWindow.hh/cc
|
||||
*03/09/13:
|
||||
|
|
|
@ -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.228 2003/09/14 10:13:06 fluxgen Exp $
|
||||
// $Id: Window.cc,v 1.229 2003/09/14 11:23:47 rathnor Exp $
|
||||
|
||||
#include "Window.hh"
|
||||
|
||||
|
@ -806,19 +806,17 @@ void FluxboxWindow::nextClient() {
|
|||
return;
|
||||
|
||||
ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client);
|
||||
WinClient *client = 0;
|
||||
if (it == m_clientlist.end()) {
|
||||
m_client = m_clientlist.front();
|
||||
return;
|
||||
client = m_clientlist.front();
|
||||
} else {
|
||||
it++;
|
||||
if (it == m_clientlist.end())
|
||||
client = m_clientlist.front();
|
||||
else
|
||||
client = *it;
|
||||
}
|
||||
|
||||
it++;
|
||||
if (it == m_clientlist.end())
|
||||
m_client = m_clientlist.front();
|
||||
else
|
||||
m_client = *it;
|
||||
m_client->raise();
|
||||
frame().setLabelButtonFocus(*m_labelbuttons[m_client]);
|
||||
frame().setFocus(setInputFocus());
|
||||
setCurrentClient(*client, true);
|
||||
}
|
||||
|
||||
void FluxboxWindow::prevClient() {
|
||||
|
@ -826,18 +824,17 @@ void FluxboxWindow::prevClient() {
|
|||
return;
|
||||
|
||||
ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client);
|
||||
WinClient *client = 0;
|
||||
if (it == m_clientlist.end()) {
|
||||
m_client = m_clientlist.front();
|
||||
return;
|
||||
client = m_clientlist.front();
|
||||
} else {
|
||||
if (it == m_clientlist.begin())
|
||||
client = m_clientlist.back();
|
||||
else
|
||||
client = *(--it);
|
||||
}
|
||||
if (it == m_clientlist.begin())
|
||||
m_client = m_clientlist.back();
|
||||
else
|
||||
m_client = *(--it);
|
||||
|
||||
m_client->raise();
|
||||
frame().setLabelButtonFocus(*m_labelbuttons[m_client]);
|
||||
frame().setFocus(setInputFocus());
|
||||
setCurrentClient(*client, true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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.190 2003/09/12 22:55:33 fluxgen Exp $
|
||||
// $Id: fluxbox.cc,v 1.191 2003/09/14 11:23:48 rathnor Exp $
|
||||
|
||||
#include "fluxbox.hh"
|
||||
|
||||
|
@ -852,7 +852,10 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
}
|
||||
} break;
|
||||
case FocusIn: {
|
||||
if (e->xfocus.mode == NotifyUngrab ||
|
||||
|
||||
// a grab is something of a pseudo-focus event, so we ignore
|
||||
// them, here we ignore some window receiving it
|
||||
if (e->xfocus.mode == NotifyGrab ||
|
||||
e->xfocus.detail == NotifyPointer)
|
||||
break;
|
||||
|
||||
|
@ -862,7 +865,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
|
||||
} break;
|
||||
case FocusOut:{
|
||||
|
||||
// and here we ignore some window losing the special grab focus
|
||||
if (e->xfocus.mode == NotifyUngrab ||
|
||||
e->xfocus.detail == NotifyPointer)
|
||||
break;
|
||||
|
@ -871,6 +874,8 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
#ifdef DEBUG
|
||||
cerr<<__FILE__<<"("<<__FUNCTION__<<") Focus out is not a FluxboxWindow !!"<<endl;
|
||||
#endif // DEBUG
|
||||
} else if (winclient && winclient == m_focused_window) {
|
||||
setFocusedWindow(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue