| @@ -72,7 +72,6 @@ pub const Systray = struct { |
| 72 |
|
72 |
|
| 73 |
const current_owner = xlib.c.XGetSelectionOwner(display, self.manager_atom); |
73 |
const current_owner = xlib.c.XGetSelectionOwner(display, self.manager_atom); |
| 74 |
if (current_owner != xlib.None) { |
74 |
if (current_owner != xlib.None) { |
| 75 |
- std.debug.print("systray: another systray is already running\n", .{}); |
|
|
| 76 |
allocator.destroy(self); |
75 |
allocator.destroy(self); |
| 77 |
return null; |
76 |
return null; |
| 78 |
} |
77 |
} |
| @@ -102,7 +101,6 @@ pub const Systray = struct { |
| 102 |
|
101 |
|
| 103 |
_ = xlib.c.XSetSelectionOwner(display, self.manager_atom, self.window, xlib.CurrentTime); |
102 |
_ = xlib.c.XSetSelectionOwner(display, self.manager_atom, self.window, xlib.CurrentTime); |
| 104 |
if (xlib.c.XGetSelectionOwner(display, self.manager_atom) != self.window) { |
103 |
if (xlib.c.XGetSelectionOwner(display, self.manager_atom) != self.window) { |
| 105 |
- std.debug.print("systray: failed to acquire selection ownership\n", .{}); |
|
|
| 106 |
_ = xlib.c.XDestroyWindow(display, self.window); |
104 |
_ = xlib.c.XDestroyWindow(display, self.window); |
| 107 |
allocator.destroy(self); |
105 |
allocator.destroy(self); |
| 108 |
return null; |
106 |
return null; |
| @@ -125,7 +123,6 @@ pub const Systray = struct { |
| 125 |
_ = xlib.XMapWindow(display, self.window); |
123 |
_ = xlib.XMapWindow(display, self.window); |
| 126 |
_ = xlib.XSync(display, xlib.False); |
124 |
_ = xlib.XSync(display, xlib.False); |
| 127 |
|
125 |
|
| 128 |
- std.debug.print("systray: initialized on screen {d}\n", .{screen}); |
|
|
| 129 |
return self; |
126 |
return self; |
| 130 |
} |
127 |
} |
| 131 |
|
128 |
|
| @@ -272,7 +269,6 @@ pub const Systray = struct { |
| 272 |
|
269 |
|
| 273 |
var wa: xlib.XWindowAttributes = undefined; |
270 |
var wa: xlib.XWindowAttributes = undefined; |
| 274 |
if (xlib.XGetWindowAttributes(self.display, icon_win, &wa) == 0) { |
271 |
if (xlib.XGetWindowAttributes(self.display, icon_win, &wa) == 0) { |
| 275 |
- std.debug.print("systray: failed to get window attributes for icon 0x{x}\n", .{icon_win}); |
|
|
| 276 |
return; |
272 |
return; |
| 277 |
} |
273 |
} |
| 278 |
|
274 |
|
| @@ -315,7 +311,6 @@ pub const Systray = struct { |
| 315 |
} |
311 |
} |
| 316 |
|
312 |
|
| 317 |
self.arrangeIcons(); |
313 |
self.arrangeIcons(); |
| 318 |
- std.debug.print("systray: docked icon 0x{x} (size {}x{})\n", .{ icon_win, icon.width, icon.height }); |
|
|
| 319 |
} |
314 |
} |
| 320 |
|
315 |
|
| 321 |
pub fn handleConfigureRequest(self: *Systray, ev: *xlib.XConfigureRequestEvent) bool { |
316 |
pub fn handleConfigureRequest(self: *Systray, ev: *xlib.XConfigureRequestEvent) bool { |
| @@ -403,7 +398,6 @@ pub const Systray = struct { |
| 403 |
if (icon.window == win) { |
398 |
if (icon.window == win) { |
| 404 |
_ = self.icons.orderedRemove(i); |
399 |
_ = self.icons.orderedRemove(i); |
| 405 |
self.arrangeIcons(); |
400 |
self.arrangeIcons(); |
| 406 |
- std.debug.print("systray: removed icon 0x{x}\n", .{win}); |
|
|
| 407 |
return true; |
401 |
return true; |
| 408 |
} |
402 |
} |
| 409 |
} |
403 |
} |