]> Dogcows Code - chaz/openbox/commitdiff
let you .focus() a messagedialog
authorDana Jansens <danakj@orodu.net>
Sun, 16 Feb 2003 12:23:35 +0000 (12:23 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Feb 2003 12:23:35 +0000 (12:23 +0000)
otk/messagedialog.cc
otk/messagedialog.hh

index 216189818cd224f184bee4c1b80321de59c7a433..c11a181e7f030da85050b9dadea179fc98ea015c 100644 (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();
index d68c1726743b67f3837e01131ac479229dd8aa1b..cc8adc7087807cbdd042e2c5c446a90b7daecd8d 100644 (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; }
This page took 0.025356 seconds and 4 git commands to generate.