X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=db7c8ace460222ff7abafa4c2d8abc4472ef6a43;hb=c8983c42a7c27321d18825f2a130c15e29046f7b;hp=74b8e71db4d8c42f553dadab2427cf9b0e9bebba;hpb=2442cdfd85e5229c7ee4ac49ca66a7d55ffcb919;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 74b8e71d..db7c8ace 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -58,6 +58,7 @@ gboolean screen_showing_desktop; DesktopLayout screen_desktop_layout; gchar **screen_desktop_names; Window screen_support_win; +Time screen_desktop_user_time = CurrentTime; static Rect **area; /* array of desktop holding array of xinerama areas */ static Rect *monitor_area; @@ -138,8 +139,7 @@ static gboolean replace_wm() } if (wait >= timeout) { - g_message(_("Timeout expired while waiting for the current WM to die" - " on screen %d"), ob_screen); + g_message(_("The WM on screen %d is not exiting"), ob_screen); return FALSE; } } @@ -206,6 +206,9 @@ gboolean screen_annex() /* set the _NET_SUPPORTED_ATOMS hint */ num_support = 55; +#ifdef SYNC + num_support += 2; +#endif i = 0; supported = g_new(gulong, num_support); supported[i++] = prop_atoms.net_wm_full_placement; @@ -262,11 +265,12 @@ gboolean screen_annex() supported[i++] = prop_atoms.net_wm_moveresize; supported[i++] = prop_atoms.net_wm_user_time; supported[i++] = prop_atoms.net_frame_extents; +#ifdef SYNC + supported[i++] = prop_atoms.net_wm_sync_request; + supported[i++] = prop_atoms.net_wm_sync_request_counter; +#endif supported[i++] = prop_atoms.ob_wm_state_undecorated; g_assert(i == num_support); -/* - supported[] = prop_atoms.net_wm_action_stick; -*/ PROP_SETA32(RootWindow(ob_display, ob_screen), net_supported, atom, supported, num_support); @@ -471,6 +475,9 @@ void screen_set_desktop(guint num) } event_ignore_queued_enters(); + + if (event_curtime != CurrentTime) + screen_desktop_user_time = event_curtime; } static void get_row_col(guint d, guint *r, guint *c) @@ -907,23 +914,19 @@ void screen_show_desktop(gboolean show) void screen_install_colormap(ObClient *client, gboolean install) { - XWindowAttributes wa; - if (client == NULL) { if (install) XInstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); else XUninstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); } else { - if (XGetWindowAttributes(ob_display, client->window, &wa) && - wa.colormap != None) { - xerror_set_ignore(TRUE); - if (install) - XInstallColormap(RrDisplay(ob_rr_inst), wa.colormap); - else - XUninstallColormap(RrDisplay(ob_rr_inst), wa.colormap); - xerror_set_ignore(FALSE); - } + xerror_set_ignore(TRUE); + if (install) { + if (client->colormap != None) + XInstallColormap(RrDisplay(ob_rr_inst), client->colormap); + } else + XUninstallColormap(RrDisplay(ob_rr_inst), client->colormap); + xerror_set_ignore(FALSE); } }