#include "popup.h"
#include "extensions.h"
#include "render/render.h"
+#include "gettext.h"
#include <X11/Xlib.h>
#ifdef HAVE_UNISTD_H
current_wm_sn_owner = None;
if (current_wm_sn_owner) {
if (!ob_replace_wm) {
- g_warning("A window manager is already running on screen %d",
+ g_message(_("A window manager is already running on screen %d"),
ob_screen);
return FALSE;
}
timestamp);
if (XGetSelectionOwner(ob_display, wm_sn_atom) != screen_support_win) {
- g_warning("Could not acquire window manager selection on screen %d",
+ g_message(_("Could not acquire window manager selection on screen %d"),
ob_screen);
return FALSE;
}
}
if (wait >= timeout) {
- g_warning("Timeout expired while waiting for the current WM to die "
- "on screen %d", ob_screen);
+ g_message(_("Timeout expired while waiting for the current WM to die"
+ " on screen %d"), ob_screen);
return FALSE;
}
}
ROOT_EVENTMASK);
xerror_set_ignore(FALSE);
if (xerror_occured) {
- g_warning("A window manager is already running on screen %d",
+ g_message(_("A window manager is already running on screen %d"),
ob_screen);
XDestroyWindow(ob_display, screen_support_win);
void screen_set_desktop(guint num)
{
+ ObClient *c;
GList *it;
guint old;
}
}
- event_ignore_queued_enters();
-
- focus_hilite = focus_fallback_target(TRUE, focus_client);
- if (focus_hilite) {
- frame_adjust_focus(focus_hilite->frame, TRUE);
-
- /*!
- When this focus_client check is not used, you can end up with
- races, as demonstrated with gnome-panel, sometimes the window
- you click on another desktop ends up losing focus cuz of the
- focus change here.
- */
- /*if (!focus_client)*/
- client_focus(focus_hilite);
+ /* have to try focus here because when you leave an empty desktop
+ there is no focus out to watch for */
+ if ((c = focus_fallback_target(TRUE, focus_client))) {
+ /* reduce flicker by hiliting now rather than waiting for the server
+ FocusIn event */
+ frame_adjust_focus(c->frame, TRUE);
+ client_focus(c);
}
+
+ event_ignore_queued_enters();
}
static void get_row_col(guint d, guint *r, guint *c)
break;
}
} else {
+ ObClient *c;
+
/* use NULL for the "old" argument because the desktop was focused
and we don't want to fallback to the desktop by default */
- focus_hilite = focus_fallback_target(TRUE, NULL);
- if (focus_hilite) {
- frame_adjust_focus(focus_hilite->frame, TRUE);
-
- /*!
- When this focus_client check is not used, you can end up with
- races, as demonstrated with gnome-panel, sometimes the window
- you click on another desktop ends up losing focus cuz of the
- focus change here.
- */
- /*if (!focus_client)*/
- client_focus(focus_hilite);
- }
+ if ((c = focus_fallback_target(TRUE, NULL)))
+ client_focus(c);
}
show = !!show; /* make it boolean */