diff options
author | rathnor <rathnor> | 2003-12-21 15:24:28 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-12-21 15:24:28 (GMT) |
commit | dfdb8219fa74defd4608f3574128f95eb9fcde64 (patch) | |
tree | 02825d7e3375ebb94daf50015928669764c45cb7 /src/Window.cc | |
parent | 8192e8bc2a34d55adae71322362890bace43de72 (diff) | |
download | fluxbox-dfdb8219fa74defd4608f3574128f95eb9fcde64.zip fluxbox-dfdb8219fa74defd4608f3574128f95eb9fcde64.tar.bz2 |
more sloppy focus fixing
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/Window.cc b/src/Window.cc index edf88fc..4d407ad 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.254 2003/12/18 18:03:21 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.255 2003/12/21 15:24:28 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -1190,23 +1190,27 @@ bool FluxboxWindow::setInputFocus(long ignore_event) { | |||
1190 | } | 1190 | } |
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | bool ret = false; | ||
1194 | |||
1193 | if (m_client->getFocusMode() == WinClient::F_LOCALLYACTIVE || | 1195 | if (m_client->getFocusMode() == WinClient::F_LOCALLYACTIVE || |
1194 | m_client->getFocusMode() == WinClient::F_PASSIVE) { | 1196 | m_client->getFocusMode() == WinClient::F_PASSIVE) { |
1195 | m_client->setInputFocus(RevertToPointerRoot, CurrentTime); | 1197 | m_client->setInputFocus(RevertToPointerRoot, CurrentTime); |
1196 | 1198 | ||
1197 | // People can ignore an event until the focus comes through | ||
1198 | // this is most likely to be an EnterNotify for sloppy focus | ||
1199 | if (ignore_event) | ||
1200 | Fluxbox::instance()->addRedirectEvent( | ||
1201 | &screen(), ignore_event, None, | ||
1202 | FocusIn, m_client->window(), None); | ||
1203 | |||
1204 | // this may or may not send, but we've setInputFocus already, so return true | 1199 | // this may or may not send, but we've setInputFocus already, so return true |
1205 | m_client->sendFocus(); | 1200 | m_client->sendFocus(); |
1206 | return true; | 1201 | ret = true; |
1207 | } else { | 1202 | } else { |
1208 | return m_client->sendFocus(); // checks if it should send or not | 1203 | ret = m_client->sendFocus(); // checks if it should send or not |
1209 | } | 1204 | } |
1205 | |||
1206 | // People can ignore an event until the focus comes through | ||
1207 | // this is most likely to be an EnterNotify for sloppy focus | ||
1208 | if (ret && m_client->getFocusMode() != WinClient::F_NOINPUT && ignore_event != None) | ||
1209 | Fluxbox::instance()->addRedirectEvent( | ||
1210 | &screen(), ignore_event, None, | ||
1211 | FocusIn, m_client->window(), None); | ||
1212 | |||
1213 | return ret; | ||
1210 | } | 1214 | } |
1211 | 1215 | ||
1212 | void FluxboxWindow::hide() { | 1216 | void FluxboxWindow::hide() { |