mirror of
https://github.com/danbulant/node-x11
synced 2026-05-27 05:52:02 +00:00
quick hack: set visual codes based on platform
This commit is contained in:
parent
7ccc7f45ea
commit
c9a75c102c
1 changed files with 10 additions and 5 deletions
|
|
@ -11,6 +11,8 @@ x11.createClient(
|
||||||
var X = display.client;
|
var X = display.client;
|
||||||
X.QueryExtension('RENDER', function(ext) {
|
X.QueryExtension('RENDER', function(ext) {
|
||||||
|
|
||||||
|
console.log(ext);
|
||||||
|
|
||||||
function RenderQueryVersion(clientMaj, clientMin, callback)
|
function RenderQueryVersion(clientMaj, clientMin, callback)
|
||||||
{
|
{
|
||||||
X.seq_num++;
|
X.seq_num++;
|
||||||
|
|
@ -341,13 +343,16 @@ x11.createClient(
|
||||||
});
|
});
|
||||||
X.MapWindow(win);
|
X.MapWindow(win);
|
||||||
|
|
||||||
//rgb24: 42 32: 38 rd: 24
|
// this values need to be queried from server!
|
||||||
|
// quick hack until I have nessesary request
|
||||||
//var rgb24 = 42;
|
// TODO: bad bad bad fix asap :)
|
||||||
//var rgba32 = 38;
|
|
||||||
|
|
||||||
var rgb24 = 71;
|
var rgb24 = 71;
|
||||||
var rgba32 = 69;
|
var rgba32 = 69;
|
||||||
|
if (process.platform == 'linux')
|
||||||
|
{
|
||||||
|
rgb24 = 42;
|
||||||
|
rgba32 = 38;
|
||||||
|
}
|
||||||
|
|
||||||
var picture = X.AllocID();
|
var picture = X.AllocID();
|
||||||
RenderCreatePicture(picture, win, rgb24, { polyEdge: 1, polyMode: 0 } );
|
RenderCreatePicture(picture, win, rgb24, { polyEdge: 1, polyMode: 0 } );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue