From 47df7dcfaf6efff3ae93680b1c3f1a7005ebe5ca Mon Sep 17 00:00:00 2001 From: ketmar Date: Thu, 16 Mar 2017 08:01:31 +0000 Subject: [PATCH] cosmetix FossilOrigin-Name: 5d69c536a060053500d76469d07d12bbfdd6a1217275821ca99f43f84b58a9c2 --- amper.d | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/amper.d b/amper.d index 0e59b51..eea88db 100644 --- a/amper.d +++ b/amper.d @@ -50,8 +50,8 @@ void hideShowWindows () { void prepareTrayIcon () { icon = readPng("skins/notifyicon.png"); trayimage = Image.fromMemoryImage(icon); - trayicon = new NotificationAreaIcon("Amper", trayimage, (MouseButton button) { - //if (button == MouseButton.left) vbwin.switchToWindow(); + trayicon = new NotificationAreaIcon("Amper", trayimage, (int x, int y, MouseButton button, ModifierState mods) { + //conwritefln!"x=%d; y=%d; button=%u; mods=0x%04x"(x, y, button, mods); if (button == MouseButton.middle) { //trayicon.close(); //trayicon = null; @@ -63,6 +63,17 @@ void prepareTrayIcon () { return; } }); + trayicon.onEnter = delegate (int x, int y, ModifierState mods) { + /* + conwritefln!"icon enter: x=%d; y=%d; mods=0x%04x"(x, y, mods); + int wx, wy, wdt, hgt; + trayicon.getWindowRect(wx, wy, wdt, hgt); + conwriteln("window rect: wx=", wx, "; wy=", wy, "; wdt=", wdt, "; hgt=", hgt); + */ + }; + trayicon.onLeave = delegate () { + //conwriteln("icon leave"); + }; } -- 2.11.4.GIT