Skip to content
Snippets Groups Projects
Commit 4d10bda0 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Fix mouse event bug

parent b645d74b
No related branches found
No related tags found
No related merge requests found
......@@ -506,18 +506,21 @@ class StatusBarI3: RootStatusBar
Console.ReadLine(); // read "["
while(true)
{
#pragma warning disable 8602
string? line = Console.ReadLine();
if(line == null) throw new Exception("I3bar close input");
if(line[0] == ',') line = line[1..];
JsonObject json = JsonObject.Parse(line).AsObject();
MouseButton button;
int jsonButton = json["button"].AsValue().GetValue<int>();
if(jsonButton == 1) button = MouseButton.Left; else
if(jsonButton == 2) button = MouseButton.Middle; else
if(jsonButton == 3) button = MouseButton.Right; else
break;
continue;
Modifiers mod = 0;
foreach(var i in json["modifiers"].AsArray())
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment