1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

Added Windows 32bit support for movable connection bar

This commit is contained in:
Bryan Roe
2019-12-10 14:39:52 -08:00
parent 7c5075b481
commit dc3e49d12c
2 changed files with 20 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -121,7 +121,17 @@ function windows_notifybar_local(title)
{
case 4:
flags = msg.lparam_raw.Deref(24, 4).toBuffer().readUInt32LE() | 0x0002; // Set SWP_NOMOVE
msg.lparam_raw.Deref(24, 4).toBuffer().writeUInt32LE(flags);
if (msg.lparam_raw.Deref(8, 4).toBuffer().readInt32LE() < this._options.window.left ||
(msg.lparam_raw.Deref(8, 4).toBuffer().readInt32LE() + this._options.window.width) >= this._options.window.right)
{
// Disallow this move, because it will go out of bounds of the current monitor
msg.lparam_raw.Deref(24, 4).toBuffer().writeUInt32LE(flags);
}
else
{
// Allow the move, but only on the X-axis
msg.lparam_raw.Deref(12, 4).toBuffer().writeInt32LE(this._options.window.y);
}
break;
case 8:
flags = msg.lparam_raw.Deref(32, 4).toBuffer().readUInt32LE() | 0x0002 // Set SWP_NOMOVE