let you .focus() a messagedialog
This commit is contained in:
parent
010e12c42a
commit
c71738f3f4
2 changed files with 7 additions and 0 deletions
|
@ -112,6 +112,12 @@ const DialogButton& MessageDialog::run()
|
|||
return *_result;
|
||||
}
|
||||
|
||||
void MessageDialog::focus()
|
||||
{
|
||||
if (visible())
|
||||
XSetInputFocus(**display, window(), None, CurrentTime);
|
||||
}
|
||||
|
||||
void MessageDialog::show()
|
||||
{
|
||||
std::vector<DialogButton>::const_iterator it, end = _buttons.end();
|
||||
|
|
|
@ -40,6 +40,7 @@ public:
|
|||
|
||||
virtual void show();
|
||||
virtual void hide();
|
||||
virtual void focus();
|
||||
|
||||
virtual const DialogButton& result() const { return *_result; }
|
||||
virtual void setResult(const DialogButton &result) { _result = &result; }
|
||||
|
|
Loading…
Reference in a new issue