*/
#include <vector>
+#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <msp/core/error.h>
#include "window.h"
XCloseDisplay(display);
}
+void Window::set_title(const string &title)
+{
+ vector<unsigned char> buf(title.begin(), title.end());
+ XTextProperty prop;
+ prop.value=&buf[0];
+ prop.encoding=XA_STRING;
+ prop.format=8;
+ prop.nitems=title.size();
+ XSetWMName(display, window, &prop);
+}
+
void Window::show()
{
XMapRaised(display, window);
Window(const DisplayOptions &dopt);
virtual ~Window();
+ void set_title(const std::string &);
+
unsigned get_width() const { return options.width; }
unsigned get_height() const { return options.height; }
void show();