X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=3f891b5a4712cd0a676fb0ab114da019d342c1e5;hb=0c8c23e8fdef2936d2ca425dcbf35e4eb7dd7edf;hp=1683c6082d1bfff657322164df45dd68af9955ba;hpb=2521fd24c59d1f526cb355952801c3afcf7b9e1f;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 1683c608..3f891b5a 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -277,7 +277,7 @@ void client_manage(Window window) XFree(wmhint); } - ob_debug("Managing window: %lx\n", window); + ob_debug("Managing window: 0x%lx\n", window); /* choose the events we want to receive on the CLIENT window */ attrib_set.event_mask = CLIENT_EVENTMASK; @@ -427,8 +427,7 @@ void client_manage(Window window) it is up to the placement routines to avoid the xinerama divides) */ transient || - (((self->positioned & PPosition) && - !(self->positioned & USPosition)) && + (!(self->positioned & USPosition) && client_normal(self) && !self->session)); } @@ -1110,8 +1109,8 @@ static void client_get_area(ObClient *self) POINT_SET(self->root_pos, wattrib.x, wattrib.y); self->border_width = wattrib.border_width; - ob_debug("client area: %d %d %d %d\n", wattrib.x, wattrib.y, - wattrib.width, wattrib.height); + ob_debug("client area: %d %d %d %d bw %d\n", wattrib.x, wattrib.y, + wattrib.width, wattrib.height, wattrib.border_width); } static void client_get_desktop(ObClient *self) @@ -1535,7 +1534,16 @@ void client_get_colormap(ObClient *self) void client_update_colormap(ObClient *self, Colormap colormap) { - self->colormap = colormap; + if (colormap == self->colormap) return; + + ob_debug("Setting client %s colormap: 0x%x\n", self->title, colormap); + + if (client_focused(self)) { + screen_install_colormap(self, FALSE); /* uninstall old one */ + self->colormap = colormap; + screen_install_colormap(self, FALSE); /* install new one */ + } else + self->colormap = colormap; } void client_update_normal_hints(ObClient *self) @@ -3464,8 +3472,8 @@ gboolean client_focus(ObClient *self) } ob_debug_type(OB_DEBUG_FOCUS, - "Focusing client \"%s\" at time %u\n", - self->title, event_curtime); + "Focusing client \"%s\" (0x%x) at time %u\n", + self->title, self->window, event_curtime); /* if there is a grab going on, then we need to cancel it. if we move focus during the grab, applications will get NotifyWhileGrabbed events @@ -3503,6 +3511,7 @@ gboolean client_focus(ObClient *self) xerror_set_ignore(FALSE); + ob_debug_type(OB_DEBUG_FOCUS, "Error focusing? %d\n", xerror_occured); return !xerror_occured; }