all repos — openbox @ 0ba441fe8f379ec506000f7fa29f867cb6bc0d51

openbox fork - make it a bit more like ryudo

otk/rendertest.cc (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "otk.hh"
#include "rendercontrol.hh"
#include "rendertexture.hh"

#include <stdio.h>
#include <X11/Xlib.h>

int main(int argc, char **argv)
{
  printf("\n");

  otk::Application app(argc, argv);
  otk::AppWidget foo(&app);
  foo.resize(600, 500);
  foo.show();
  
  otk::RenderControl *rc = otk::RenderControl::getRenderControl(0);

  otk::RenderTexture tex;
  
  rc->drawBackground(&foo, tex);
  XSetWindowBackgroundPixmap(**otk::display, foo.window(), foo.pixmap());
  XClearWindow(**otk::display, foo.window());
  
  app.run();

  delete rc;

  printf("\n");
  return 0;
}