mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 00:03:45 +00:00
1. Fixed UTF8 characters for notifybar-desktop on linux
2. Fixed compiler warning, and missing #ifdef
This commit is contained in:
@@ -119,7 +119,7 @@ void ILibDuktape_Compressor_End(ILibDuktape_DuplexStream *stream, void *user)
|
||||
avail = sizeof(tmp) - cs->Z.avail_out;
|
||||
if (avail > 0)
|
||||
{
|
||||
cs->crc = crc32(cs->crc, tmp, (unsigned int)avail);
|
||||
cs->crc = crc32(cs->crc, (unsigned char*)tmp, (unsigned int)avail);
|
||||
ILibDuktape_DuplexStream_WriteData(cs->ds, tmp, (int)avail);
|
||||
}
|
||||
} while (cs->Z.avail_out == 0);
|
||||
@@ -147,7 +147,7 @@ ILibTransport_DoneState ILibDuktape_Compressor_Write(ILibDuktape_DuplexStream *s
|
||||
avail = sizeof(tmp) - cs->Z.avail_out;
|
||||
if (avail > 0)
|
||||
{
|
||||
cs->crc = crc32(cs->crc, tmp, (unsigned int)avail);
|
||||
cs->crc = crc32(cs->crc, (unsigned char*)tmp, (unsigned int)avail);
|
||||
ret = ILibDuktape_DuplexStream_WriteData(cs->ds, tmp, (int)avail);
|
||||
}
|
||||
} while (cs->Z.avail_out == 0);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -235,6 +235,7 @@ duk_ret_t ILibDuktape_fs_closeSync(duk_context *ctx)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
#ifdef WIN32
|
||||
if (duk_is_number(ctx, 0))
|
||||
{
|
||||
void *tmp = (void*)(uintptr_t)duk_require_uint(ctx, 0);
|
||||
@@ -257,6 +258,7 @@ duk_ret_t ILibDuktape_fs_closeSync(duk_context *ctx)
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int fd = duk_require_int(ctx, 0);
|
||||
if (fd < 65535)
|
||||
|
||||
@@ -310,6 +310,7 @@ function monitorinfo()
|
||||
this._X11.CreateMethod('XSync');
|
||||
this._X11.CreateMethod('XBlackPixel');
|
||||
this._X11.CreateMethod('XWhitePixel');
|
||||
this._X11.CreateMethod('Xutf8SetWMProperties');
|
||||
}
|
||||
|
||||
var ch = require('child_process').execFile('/bin/sh', ['sh']);
|
||||
|
||||
@@ -277,6 +277,7 @@ function x_notifybar(title)
|
||||
|
||||
this.notifybar._windows.peek().notifybar = require('monitor-info')._X11.XCreateSimpleWindow(m[i].display, this.notifybar._windows.peek().root, start, 0, barWidth, 1, 0, white, white);
|
||||
require('monitor-info')._X11.XStoreName(m[i].display, this.notifybar._windows.peek().notifybar, require('_GenericMarshal').CreateVariable(this.notifybar.title));
|
||||
require('monitor-info')._X11.Xutf8SetWMProperties(m[i].display, this.notifybar._windows.peek().notifybar, require('_GenericMarshal').CreateVariable(this.notifybar.title), 0, 0, 0, 0, 0, 0);
|
||||
|
||||
require('monitor-info').setWindowSizeHints(m[i].display, this.notifybar._windows.peek().notifybar, start, 0, barWidth, 1, barWidth, 1, barWidth, 1);
|
||||
require('monitor-info').hideWindowIcon(m[i].display, this.notifybar._windows.peek().root, this.notifybar._windows.peek().notifybar);
|
||||
|
||||
Reference in New Issue
Block a user