#include "config.h"
#include "screen.h"
#include "client.h"
+#include "session.h"
#include "frame.h"
#include "event.h"
#include "focus.h"
XSetWindowAttributes attrib;
pid_t pid;
gint i, num_support;
+ Atom *prop_atoms_start, *wm_supported_pos;
gulong *supported;
/* create the netwm support window */
window, screen_support_win);
/* set the _NET_SUPPORTED_ATOMS hint */
- num_support = 55;
-#ifdef SYNC
- num_support += 2;
-#endif
+
+ /* this is all the atoms after net_supported in the prop_atoms struct */
+ prop_atoms_start = (Atom*)&prop_atoms;
+ wm_supported_pos = (Atom*)&(prop_atoms.net_supported);
+ num_support = sizeof(prop_atoms) / sizeof(Atom) -
+ (wm_supported_pos - prop_atoms_start) - 1;
i = 0;
supported = g_new(gulong, num_support);
+ supported[i++] = prop_atoms.net_supporting_wm_check;
supported[i++] = prop_atoms.net_wm_full_placement;
supported[i++] = prop_atoms.net_current_desktop;
supported[i++] = prop_atoms.net_number_of_desktops;
supported[i++] = prop_atoms.net_wm_visible_icon_name;
supported[i++] = prop_atoms.net_wm_desktop;
supported[i++] = prop_atoms.net_wm_strut;
+ supported[i++] = prop_atoms.net_wm_strut_partial;
+ supported[i++] = prop_atoms.net_wm_icon;
+ supported[i++] = prop_atoms.net_wm_icon_geometry;
supported[i++] = prop_atoms.net_wm_window_type;
supported[i++] = prop_atoms.net_wm_window_type_desktop;
supported[i++] = prop_atoms.net_wm_window_type_dock;
supported[i++] = prop_atoms.net_wm_moveresize;
supported[i++] = prop_atoms.net_wm_user_time;
supported[i++] = prop_atoms.net_frame_extents;
+ supported[i++] = prop_atoms.net_startup_id;
#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;
+
+ supported[i++] = prop_atoms.kde_wm_change_state;
+ supported[i++] = prop_atoms.kde_net_wm_frame_strut;
+ supported[i++] = prop_atoms.kde_net_wm_window_type_override;
+
+ supported[i++] = prop_atoms.openbox_wm_state_undecorated;
+ supported[i++] = prop_atoms.openbox_pid;
+ supported[i++] = prop_atoms.openbox_config;
+ supported[i++] = prop_atoms.openbox_control;
g_assert(i == num_support);
PROP_SETA32(RootWindow(ob_display, ob_screen),
d < screen_num_desktops)
{
screen_set_desktop(d);
- } else
+ } else if (session_desktop >= 0)
+ screen_set_desktop(MIN((guint)session_desktop,
+ screen_num_desktops));
+ else
screen_set_desktop(MIN(config_screen_firstdesk,
screen_num_desktops) - 1);
}
}
-void screen_show_desktop(gboolean show)
+void screen_show_desktop(gboolean show, gboolean restore_focus)
{
GList *it;
client_focus(it->data))
break;
}
- } else {
+ } else if (restore_focus) {
ObClient *c;
/* use NULL for the "old" argument because the desktop was focused