let you .focus() a messagedialog

This commit is contained in:
Dana Jansens 2003-02-16 12:23:35 +00:00
parent 010e12c42a
commit c71738f3f4
2 changed files with 7 additions and 0 deletions

View file

@ -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();

View file

@ -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; }