X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=5eeda998d919443b028f7f356de38546950d11ba;hb=ad852b6b56e43bdd7dda1389f54051cf92c0fad9;hp=4dad98829884d3a5fb60df9d78d3cebc04a90c53;hpb=cf3427b2e38c47b9ae39051703ef958b4d7f44e4;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 4dad9882..5eeda998 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -940,6 +940,9 @@ static void client_get_all(ObClient *self) (min/max sizes), so we're ready to set up the decorations/functions */ client_setup_decor_and_functions(self); +#ifdef SYNC + client_update_sync_request_counter(self); +#endif client_get_client_machine(self); client_get_colormap(self); client_update_title(self); @@ -1291,18 +1294,37 @@ void client_update_protocols(ObClient *self) if (PROP_GETA32(self->window, wm_protocols, atom, &proto, &num_return)) { for (i = 0; i < num_return; ++i) { - if (proto[i] == prop_atoms.wm_delete_window) { + if (proto[i] == prop_atoms.wm_delete_window) /* this means we can request the window to close */ self->delete_window = TRUE; - } else if (proto[i] == prop_atoms.wm_take_focus) + else if (proto[i] == prop_atoms.wm_take_focus) /* if this protocol is requested, then the window will be notified whenever we want it to receive focus */ self->focus_notify = TRUE; +#ifdef SYNC + else if (proto[i] == prop_atoms.net_wm_sync_request) + /* if this protocol is requested, then the resizing the + window will be synchronized between the frame and the + client */ + self->sync_request = TRUE; +#endif } g_free(proto); } } +#ifdef SYNC +void client_update_sync_request_counter(ObClient *self) +{ + guint32 i; + + if (PROP_GET32(self->window, net_wm_sync_request_counter, cardinal, &i)) { + self->sync_counter = i; + } else + self->sync_counter = None; +} +#endif + static void client_get_gravity(ObClient *self) { XWindowAttributes wattrib; @@ -3097,10 +3119,11 @@ void client_activate(ObClient *self, gboolean here, gboolean user) to activate it or not (a parent or group member is currently active)? */ - ob_debug("Want to activate window 0x%x with time %u (last time %u), " - "source=%s\n", - self->window, event_curtime, last_time, - (user ? "user" : "application")); + ob_debug_type(OB_DEBUG_FOCUS, + "Want to activate window 0x%x with time %u (last time %u), " + "source=%s\n", + self->window, event_curtime, last_time, + (user ? "user" : "application")); if (!user && event_curtime && last_time && !event_time_after(event_curtime, last_time))