aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/Window.cc39
-rw-r--r--src/fluxbox.cc11
3 files changed, 29 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index a12ce2e..1370c25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.6: 2Changes for 0.9.6:
3*03/09/14: 3*03/09/14:
4 * Focus fixes (Simon)
5 Hopefully fixes mysterious instances of focus not being set right.
6 Window.cc fluxbox.cc
4 * More optimization to reduce flicker in titlebar 7 * More optimization to reduce flicker in titlebar
5 Screen.cc, FbWinFrame.cc/hh, TextButton.hh/cc, FbWindow.hh/cc 8 Screen.cc, FbWinFrame.cc/hh, TextButton.hh/cc, FbWindow.hh/cc
6*03/09/13: 9*03/09/13:
diff --git a/src/Window.cc b/src/Window.cc
index b33bcbe..972a025 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.228 2003/09/14 10:13:06 fluxgen Exp $ 25// $Id: Window.cc,v 1.229 2003/09/14 11:23:47 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -806,19 +806,17 @@ void FluxboxWindow::nextClient() {
806 return; 806 return;
807 807
808 ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); 808 ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client);
809 WinClient *client = 0;
809 if (it == m_clientlist.end()) { 810 if (it == m_clientlist.end()) {
810 m_client = m_clientlist.front(); 811 client = m_clientlist.front();
811 return; 812 } else {
813 it++;
814 if (it == m_clientlist.end())
815 client = m_clientlist.front();
816 else
817 client = *it;
812 } 818 }
813 819 setCurrentClient(*client, true);
814 it++;
815 if (it == m_clientlist.end())
816 m_client = m_clientlist.front();
817 else
818 m_client = *it;
819 m_client->raise();
820 frame().setLabelButtonFocus(*m_labelbuttons[m_client]);
821 frame().setFocus(setInputFocus());
822} 820}
823 821
824void FluxboxWindow::prevClient() { 822void FluxboxWindow::prevClient() {
@@ -826,18 +824,17 @@ void FluxboxWindow::prevClient() {
826 return; 824 return;
827 825
828 ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); 826 ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client);
827 WinClient *client = 0;
829 if (it == m_clientlist.end()) { 828 if (it == m_clientlist.end()) {
830 m_client = m_clientlist.front(); 829 client = m_clientlist.front();
831 return; 830 } else {
831 if (it == m_clientlist.begin())
832 client = m_clientlist.back();
833 else
834 client = *(--it);
832 } 835 }
833 if (it == m_clientlist.begin())
834 m_client = m_clientlist.back();
835 else
836 m_client = *(--it);
837 836
838 m_client->raise(); 837 setCurrentClient(*client, true);
839 frame().setLabelButtonFocus(*m_labelbuttons[m_client]);
840 frame().setFocus(setInputFocus());
841} 838}
842 839
843 840
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index d83fe0b..2fbf56b 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.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: fluxbox.cc,v 1.190 2003/09/12 22:55:33 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.191 2003/09/14 11:23:48 rathnor Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -852,7 +852,10 @@ void Fluxbox::handleEvent(XEvent * const e) {
852 } 852 }
853 } break; 853 } break;
854 case FocusIn: { 854 case FocusIn: {
855 if (e->xfocus.mode == NotifyUngrab || 855
856 // a grab is something of a pseudo-focus event, so we ignore
857 // them, here we ignore some window receiving it
858 if (e->xfocus.mode == NotifyGrab ||
856 e->xfocus.detail == NotifyPointer) 859 e->xfocus.detail == NotifyPointer)
857 break; 860 break;
858 861
@@ -862,7 +865,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
862 865
863 } break; 866 } break;
864 case FocusOut:{ 867 case FocusOut:{
865 868 // and here we ignore some window losing the special grab focus
866 if (e->xfocus.mode == NotifyUngrab || 869 if (e->xfocus.mode == NotifyUngrab ||
867 e->xfocus.detail == NotifyPointer) 870 e->xfocus.detail == NotifyPointer)
868 break; 871 break;
@@ -871,6 +874,8 @@ void Fluxbox::handleEvent(XEvent * const e) {
871#ifdef DEBUG 874#ifdef DEBUG
872 cerr<<__FILE__<<"("<<__FUNCTION__<<") Focus out is not a FluxboxWindow !!"<<endl; 875 cerr<<__FILE__<<"("<<__FUNCTION__<<") Focus out is not a FluxboxWindow !!"<<endl;
873#endif // DEBUG 876#endif // DEBUG
877 } else if (winclient && winclient == m_focused_window) {
878 setFocusedWindow(0);
874 } 879 }
875 } 880 }
876 break; 881 break;