+ case xproto.KeyReleaseEvent:
+ fmt.Printf("ILLI: Received xproto.KeyReleaseEvent\n")
+ case xproto.DestroyNotifyEvent:
+ fmt.Printf("ILLI: Received xproto.DestroyNotifyEvent\n")
+ case xproto.ConfigureRequestEvent:
+ fmt.Printf("ILLI: Received xproto.ConfigureRequestEvent\n")
+ rewrittenEvent := xproto.ConfigureNotifyEvent{
+ Event: e.Window,
+ Window: e.Window,
+ AboveSibling: 0,
+ X: e.X,
+ Y: e.Y,
+ Width: e.Width,
+ Height: e.Height,
+ BorderWidth: 0,
+ OverrideRedirect: false,
+ }
+ xproto.SendEventChecked(xconn, false, e.Window, xproto.EventMaskStructureNotify, string(rewrittenEvent.Bytes()))
+ case xproto.MapRequestEvent:
+ fmt.Printf("ILLI: Received xproto.MapRequestEvent\n")
+ if windowAttributes, err := xproto.GetWindowAttributes(xconn, e.Window).Reply(); err != nil || !windowAttributes.OverrideRedirect {
+ xproto.MapWindowChecked(xconn, e.Window)
+ attachedDisplays[0].windows = append(attachedDisplays[0].windows, e.Window)
+
+ if err := xproto.ConfigureWindowChecked (
+ xconn,
+ attachedDisplays[0].windows[0],
+ xproto.ConfigWindowX |
+ xproto.ConfigWindowY |
+ xproto.ConfigWindowWidth |
+ xproto.ConfigWindowHeight,
+ []uint32{
+ uint32(100), // TODO: Temporarily hardcoding for testing.
+ uint32(100), // TODO: Temporarily hardcoding for testing.
+ uint32(1720), // TODO: Temporarily hardcoding for testing.
+ uint32(1000), // TODO: Temporarily hardcoding for testing.
+ }).Check(); err != nil {
+ fmt.Println("ILLI: Failed to handle MapRequestEvent")
+ }
+
+ }
+ case xproto.EnterNotifyEvent:
+ fmt.Printf("ILLI: Received xproto.EnterNotifyEvent\n")