fix up various focus-related issues
This commit is contained in:
parent
7037b9ca2c
commit
99b6dc4e5d
3 changed files with 14 additions and 10 deletions
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Screen.cc,v 1.156 2003/05/11 17:11:59 fluxgen Exp $
|
||||
// $Id: Screen.cc,v 1.157 2003/05/11 23:44:08 rathnor Exp $
|
||||
|
||||
|
||||
#include "Screen.hh"
|
||||
|
@ -1270,7 +1270,10 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
|||
} else {
|
||||
// always put on end of focused list, if it gets focused it'll get pushed up
|
||||
// there is only the one win client at this stage
|
||||
focused_list.push_back(&win->winClient());
|
||||
if (doFocusNew())
|
||||
focused_list.push_front(&win->winClient());
|
||||
else
|
||||
focused_list.push_back(&win->winClient());
|
||||
|
||||
//TODO: is next line needed?
|
||||
Fluxbox::instance()->saveWindowSearch(client, win);
|
||||
|
|
|
@ -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.171 2003/05/11 17:14:41 fluxgen Exp $
|
||||
// $Id: Window.cc,v 1.172 2003/05/11 23:44:08 rathnor Exp $
|
||||
|
||||
#include "Window.hh"
|
||||
|
||||
|
@ -1249,8 +1249,10 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
|
|||
|
||||
if (iconic || reassoc) {
|
||||
screen().reassociateWindow(this, screen().getCurrentWorkspace()->workspaceID(), false);
|
||||
} else if (moving || m_workspace_number != screen().getCurrentWorkspace()->workspaceID())
|
||||
} else if (moving || m_workspace_number != screen().getCurrentWorkspace()->workspaceID()) {
|
||||
oplock = false;
|
||||
return;
|
||||
}
|
||||
|
||||
bool was_iconic = iconic;
|
||||
|
||||
|
@ -1264,7 +1266,7 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
|
|||
(*client_it)->show();
|
||||
(*client_it)->setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
|
||||
}
|
||||
|
||||
|
||||
m_frame.show();
|
||||
|
||||
if (was_iconic && screen().doFocusNew())
|
||||
|
@ -2622,7 +2624,6 @@ void FluxboxWindow::applyDecorations() {
|
|||
else
|
||||
m_frame.hideHandle();
|
||||
|
||||
m_frame.show();
|
||||
// is reconfigure needed here?
|
||||
}
|
||||
|
||||
|
|
|
@ -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.138 2003/05/11 22:19:17 fluxgen Exp $
|
||||
// $Id: fluxbox.cc,v 1.139 2003/05/11 23:44:09 rathnor Exp $
|
||||
|
||||
#include "fluxbox.hh"
|
||||
|
||||
|
@ -2382,9 +2382,9 @@ void Fluxbox::revertFocus(BScreen &screen) {
|
|||
// Fluxbox::FocusModel = sloppy, click, whatever
|
||||
WinClient *next_focus = screen.getLastFocusedWindow(screen.getCurrentWorkspaceID());
|
||||
|
||||
if (next_focus && next_focus->fbwindow()) {
|
||||
setFocusedWindow(next_focus->fbwindow());
|
||||
} else {
|
||||
// if setting focus fails, or isn't possible, fallback correctly
|
||||
if (!(next_focus && next_focus->fbwindow() &&
|
||||
next_focus->fbwindow()->setCurrentClient(*next_focus, true))) {
|
||||
setFocusedWindow(0); // so we don't get dangling m_focused_window pointer
|
||||
switch (screen.getFocusModel()) {
|
||||
case SLOPPYFOCUS:
|
||||
|
|
Loading…
Reference in a new issue