nitpicker: allow refocus during global key ops
This commit is contained in:
parent
f01b205c30
commit
a01a423c91
|
@ -30,6 +30,13 @@ class Mode
|
||||||
|
|
||||||
Session *_next_focused_session = nullptr;
|
Session *_next_focused_session = nullptr;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* True while a global key sequence is processed
|
||||||
|
*/
|
||||||
|
bool _global_key_sequence = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual ~Mode() { }
|
virtual ~Mode() { }
|
||||||
|
@ -64,7 +71,13 @@ class Mode
|
||||||
*/
|
*/
|
||||||
void apply_pending_focus_change()
|
void apply_pending_focus_change()
|
||||||
{
|
{
|
||||||
if (key_is_pressed())
|
/*
|
||||||
|
* Defer focus changes to a point where no drag operation is in
|
||||||
|
* flight because otherwise, the involved sessions would obtain
|
||||||
|
* inconsistent press and release events. However, focus changes
|
||||||
|
* during global key sequences are fine.
|
||||||
|
*/
|
||||||
|
if (key_is_pressed() && !_global_key_sequence)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_focused_session != _next_focused_session)
|
if (_focused_session != _next_focused_session)
|
||||||
|
|
|
@ -46,11 +46,6 @@ class User_state : public Mode, public View_stack
|
||||||
*/
|
*/
|
||||||
Session *_input_receiver = nullptr;
|
Session *_input_receiver = nullptr;
|
||||||
|
|
||||||
/*
|
|
||||||
* True while a global key sequence is processed
|
|
||||||
*/
|
|
||||||
bool _global_key_sequence = false;
|
|
||||||
|
|
||||||
void _update_all();
|
void _update_all();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user