*/
if (numURelevant != numXRelevant ||
numURelevant != up->tracker->count) {
- Debug("%s: mismatch (count): server %u, unity %u, uwt %u\n", __func__,
- numXRelevant, numURelevant, up->tracker->count);
+ UNITY_DEBUGLOG(up, "%s: mismatch (count): server %u, unity %u, uwt %u\n", __func__,
+ numXRelevant, numURelevant, up->tracker->count);
goto out;
}
if (memcmp(relevantXChildren, relevantUChildren, childrenSize) ||
memcmp(relevantXChildren, trackerChildren, childrenSize)) {
- Debug("%s: mismatch!\n", callerName);
- Debug("%s: %8s %10s %10s %10s\n", callerName, "index", "X Server",
- "Unity", "UWT");
+ UNITY_DEBUGLOG(up, "%s: mismatch!\n", callerName);
+ UNITY_DEBUGLOG(up, "%s: %8s %10s %10s %10s\n", callerName, "index", "X Server",
+ "Unity", "UWT");
for (i = 0; i < nWindows; i++) {
if (relevantXChildren[i] != relevantUChildren[i] ||
relevantXChildren[i] != trackerChildren[i]) {
- Debug("%s: [%6u] %#10lx %#10lx %#10lx\n", callerName, i,
- relevantXChildren[i], relevantUChildren[i],
- trackerChildren[i]);
+ UNITY_DEBUGLOG(up, "%s: [%6u] %#10lx %#10lx %#10lx\n", callerName, i,
+ relevantXChildren[i], relevantUChildren[i],
+ trackerChildren[i]);
}
}
} else {
- Debug("%s: match (%u windows).\n", callerName, nWindows);
+ UNITY_DEBUGLOG(up, "%s: match (%u windows).\n", callerName, nWindows);
for (i = 0; i < nWindows; i++) {
- Debug("%s: [%u] %#lx\n", callerName, i, relevantXChildren[i]);
+ UNITY_DEBUGLOG(up, "%s: [%u] %#lx\n", callerName, i, relevantXChildren[i]);
}
}
}
wasRelevant = upw->isRelevant;
- Debug("%s: %#lx::%#lx -> %#lx::%#lx\n", __func__, upw->toplevelWindow,
- upw->clientWindow, toplevelWindow, clientWindow);
+ UNITY_DEBUGLOG(up, "%s: %#lx::%#lx -> %#lx::%#lx\n", __func__, upw->toplevelWindow,
+ upw->clientWindow, toplevelWindow, clientWindow);
UPWindowSetRelevance(up, upw, FALSE);
if (upw->toplevelWindow) {
XSelectInput(up->display, upw->toplevelWindow, 0);
if (HashTable_Lookup(up->allWindows,
GUINT_TO_POINTER(toplevelWindow),
(void **)&upw)) {
- Debug("Lookup of window %#lx returned %#lx\n",
- toplevelWindow, upw->toplevelWindow);
+ Log("Lookup of window %#lx returned %#lx\n",
+ toplevelWindow, upw->toplevelWindow);
abort();
}
upw = (UnityPlatformWindow*)Util_SafeCalloc(1, sizeof *upw);
upw->refs = 1;
- Debug("Creating new window for %#lx/%#lx/%#lx\n",
- toplevelWindow, clientWindow, rootWindow);
+ UNITY_DEBUGLOG(up, "Creating new window for %#lx/%#lx/%#lx\n",
+ toplevelWindow, clientWindow, rootWindow);
upw->rootWindow = rootWindow;
for (upw->screenNumber = 0;
upw->screenNumber < (int)up->rootWindows->numWindows
ASSERT(upw->lowerWindow != upw);
if (upw->isRelevant) {
up->stackingChanged = TRUE;
- Debug("Stacking order has changed\n");
+ UNITY_DEBUGLOG(up, "Stacking order has changed\n");
}
}
}
out:
ASSERT(shouldBeRelevant >= 0);
- Debug("Relevance for (%p) %#lx/%#lx/%#lx is %d (window type %d)\n",
- upw, upw->toplevelWindow, upw->clientWindow, upw->rootWindow,
- shouldBeRelevant, upw->windowType);
+ UNITY_DEBUGLOG(up,
+ "Relevance for (%p) %#lx/%#lx/%#lx is %d (window type %d)\n",
+ upw, upw->toplevelWindow, upw->clientWindow, upw->rootWindow,
+ shouldBeRelevant, upw->windowType);
UPWindowSetRelevance(up, upw, shouldBeRelevant ? TRUE : FALSE);
}
y -= border_width;
#ifdef VMX86_DEVEL
- Debug("Moving window %#lx/%#lx to (%d, %d) +(%d, %d)\n",
- upw->toplevelWindow, upw->clientWindow,
- x, y, xprime - x, yprime - y);
+ UNITY_DEBUGLOG(up, "Moving window %#lx/%#lx to (%d, %d) +(%d, %d)\n",
+ upw->toplevelWindow, upw->clientWindow,
+ x, y, xprime - x, yprime - y);
#endif
/*
|| (xevent->xconfigure.above == None && upw->lowerWindow)
|| (upw->lowerWindow && xevent->xconfigure.above
!= upw->lowerWindow->toplevelWindow)) {
- Debug("Marking window %#lx/%#lx for restacking\n",
- upw->toplevelWindow, upw->clientWindow);
+ UNITY_DEBUGLOG(up, "Marking window %#lx/%#lx for restacking\n",
+ upw->toplevelWindow, upw->clientWindow);
UPWindow_Restack(up, upw, xevent->xconfigure.above);
}
} else {
- Debug("ProcessConfigureEvent skipped event on window %#lx (upw was %#lx/%#lx)\n",
- xevent->xconfigure.window, upw->toplevelWindow, upw->clientWindow);
+ UNITY_DEBUGLOG(up,
+ "ProcessConfigureEvent skipped event on window %#lx (upw was %#lx/%#lx)\n",
+ xevent->xconfigure.window, upw->toplevelWindow, upw->clientWindow);
}
#ifdef VMX86_DEVEL
desktopId = up->desktopInfo.guestDesktopToUnity[guestDesktop];
}
- Debug("Window %#lx is now on desktop %d\n", upw->toplevelWindow, desktopId);
+ UNITY_DEBUGLOG(up, "Window %#lx is now on desktop %d\n", upw->toplevelWindow,
+ desktopId);
UnityWindowTracker_ChangeWindowDesktop(up->tracker,
upw->toplevelWindow,
desktopId);
if (cDesk == gDesk || gDesk == -1) {
if (isMinimized) {
if (! (newState & UNITY_WINDOW_STATE_MINIMIZED)) {
- Debug("Enabling minimized attribute for window %#lx/%#lx\n",
- upw->toplevelWindow, upw->clientWindow);
+ UNITY_DEBUGLOG(up,
+ "Enabling minimized attribute for window %#lx/%#lx\n",
+ upw->toplevelWindow, upw->clientWindow);
newState |= UNITY_WINDOW_STATE_MINIMIZED;
}
} else {
if ((newState & UNITY_WINDOW_STATE_MINIMIZED)) {
- Debug("Disabling minimized attribute for window %#lx/%#lx\n",
- upw->toplevelWindow, upw->clientWindow);
+ UNITY_DEBUGLOG(up,
+ "Disabling minimized attribute for window %#lx/%#lx\n",
+ upw->toplevelWindow, upw->clientWindow);
newState &= ~UNITY_WINDOW_STATE_MINIMIZED;
}
}
}
} else {
- Debug("%s: Unable to get window desktop\n", __FUNCTION__);
+ Log("%s: Unable to get window desktop\n", __FUNCTION__);
}
if (newState != info->state) {
return FALSE;
}
- Debug("UnityPlatformMinimizeWindow(%#lx)\n", upw->toplevelWindow);
+ UNITY_DEBUGLOG(up, "UnityPlatformMinimizeWindow(%#lx)\n", upw->toplevelWindow);
upw->wantInputFocus = FALSE;
if (!upw->isMinimized) {
Atom data[5] = {0, 0, 0, 0, 0};
- Debug("Minimizing window %#x\n", window);
+ UNITY_DEBUGLOG(up, "Minimizing window %#x\n", window);
upw->isMinimized = TRUE;
data[0] = _NET_WM_STATE_ADD;
if (UnityPlatformWMProtocolSupported(up, UNITY_X11_WM__NET_WM_STATE_MINIMIZED)) {
XIconifyWindow(up->display, upw->clientWindow, 0);
} else {
- Debug("Window %#x is already minimized\n", window);
+ UNITY_DEBUGLOG(up, "Window %#x is already minimized\n", window);
}