[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53410] Variable Editor: Title bar doesn't hig
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #53410] Variable Editor: Title bar doesn't highlight according to focus rules |
Date: |
Wed, 11 Apr 2018 00:30:17 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #14, bug #53410 (project octave):
Huh. So it does. I printed out the following:
void variable_editor::focusInEvent (QFocusEvent *ev)
{
std::cerr << "HOCUS FOCUS\n";
octave_dock_widget::focusInEvent (ev);
// set focus to the current variable
QWidget *fw = m_main->focusWidget ();
if (fw != nullptr)
fw->setFocus ();
else
std::cerr << "fw is NULL\n";
}
and it appears that the focusInEvent is occurring with the transition to/from
docked state (good), but the m_main QMainWindow for the individual variables
is losing its focusWidget() (it becomes NULL, bad). I wonder why, and I
wonder if there is anything one can do to prevent the loss of focusWidget().
I would have to think losing focus transitioning to/from docked state must
have always been there but I never paid close attention.
Well, give the following patch a try. It records the V.E.'s QMainWindow's
focusWidget() just before, presumably, transition to from docked state via the
focusOutEvent().
(file #43878)
_______________________________________________________
Additional Item Attachment:
File name: octave-ve_focus_restore_after_dock_undock-djs2018apr10.patch Size:2
KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53410>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/