more compose and select2nd
This commit is contained in:
parent
ab3309338f
commit
86ee497b55
1 changed files with 33 additions and 31 deletions
|
@ -953,13 +953,13 @@ FluxboxWindow::ClientList::iterator FluxboxWindow::getClientInsertPosition(int x
|
||||||
&labelbutton))
|
&labelbutton))
|
||||||
return m_clientlist.end();
|
return m_clientlist.end();
|
||||||
|
|
||||||
Client2ButtonMap::iterator it = m_labelbuttons.begin();
|
Client2ButtonMap::iterator it =
|
||||||
Client2ButtonMap::iterator it_end = m_labelbuttons.end();
|
find_if(m_labelbuttons.begin(),
|
||||||
// find the label button to move next to
|
m_labelbuttons.end(),
|
||||||
for (; it != it_end; it++) {
|
Compose(bind2nd(equal_to<Window>(), labelbutton),
|
||||||
if ((*it).second->window() == labelbutton)
|
Compose(mem_fun(&TextButton::window),
|
||||||
break;
|
Select2nd<Client2ButtonMap::value_type>())));
|
||||||
}
|
|
||||||
|
|
||||||
// label button not found
|
// label button not found
|
||||||
if (it == m_labelbuttons.end())
|
if (it == m_labelbuttons.end())
|
||||||
|
@ -993,16 +993,16 @@ void FluxboxWindow::moveClientTo(WinClient &win, int x, int y) {
|
||||||
x, y, &dest_x, &dest_y,
|
x, y, &dest_x, &dest_y,
|
||||||
&labelbutton))
|
&labelbutton))
|
||||||
return;
|
return;
|
||||||
Client2ButtonMap::iterator it = m_labelbuttons.begin();
|
|
||||||
Client2ButtonMap::iterator it_end = m_labelbuttons.end();
|
Client2ButtonMap::iterator it =
|
||||||
//find the label button to move next to
|
find_if(m_labelbuttons.begin(),
|
||||||
for (; it != it_end; it++) {
|
m_labelbuttons.end(),
|
||||||
if ((*it).second->window() == labelbutton)
|
Compose(bind2nd(equal_to<Window>(), labelbutton),
|
||||||
break;
|
Compose(mem_fun(&TextButton::window),
|
||||||
}
|
Select2nd<Client2ButtonMap::value_type>())));
|
||||||
|
|
||||||
// label button not found
|
// label button not found
|
||||||
if (it == it_end)
|
if (it == m_labelbuttons.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Window child_return = 0;
|
Window child_return = 0;
|
||||||
|
@ -2766,14 +2766,15 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
|
||||||
WinClient *client = 0;
|
WinClient *client = 0;
|
||||||
if (!inside_titlebar) {
|
if (!inside_titlebar) {
|
||||||
// determine if we're in titlebar
|
// determine if we're in titlebar
|
||||||
Client2ButtonMap::iterator it = m_labelbuttons.begin();
|
Client2ButtonMap::iterator it =
|
||||||
Client2ButtonMap::iterator it_end = m_labelbuttons.end();
|
find_if(m_labelbuttons.begin(),
|
||||||
for (; it != it_end; ++it) {
|
m_labelbuttons.end(),
|
||||||
if ((*it).second->window() == me.window) {
|
Compose(bind2nd(equal_to<Window>(), me.window),
|
||||||
inside_titlebar = true;
|
Compose(mem_fun(&TextButton::window),
|
||||||
client = (*it).first;
|
Select2nd<Client2ButtonMap::value_type>())));
|
||||||
break;
|
if (it != m_labelbuttons.end()) {
|
||||||
}
|
inside_titlebar = true;
|
||||||
|
client = (*it).first;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2984,14 +2985,15 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
|
||||||
// don't waste our time scanning if we aren't real sloppy focus
|
// don't waste our time scanning if we aren't real sloppy focus
|
||||||
if (screen().isSloppyFocus()) {
|
if (screen().isSloppyFocus()) {
|
||||||
// determine if we're in a label button (tab)
|
// determine if we're in a label button (tab)
|
||||||
Client2ButtonMap::iterator it = m_labelbuttons.begin();
|
Client2ButtonMap::iterator it =
|
||||||
Client2ButtonMap::iterator it_end = m_labelbuttons.end();
|
find_if(m_labelbuttons.begin(),
|
||||||
for (; it != it_end; ++it) {
|
m_labelbuttons.end(),
|
||||||
if ((*it).second->window() == ev.window) {
|
Compose(bind2nd(equal_to<Window>(), ev.window),
|
||||||
client = (*it).first;
|
Compose(mem_fun(&TextButton::window),
|
||||||
break;
|
Select2nd<Client2ButtonMap::value_type>())));
|
||||||
}
|
if (it != m_labelbuttons.end())
|
||||||
}
|
client = (*it).first;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (ev.window == frame().window() ||
|
if (ev.window == frame().window() ||
|
||||||
ev.window == m_client->window() ||
|
ev.window == m_client->window() ||
|
||||||
|
|
Loading…
Reference in a new issue