self->below = TRUE;
else if (state[i] == prop_atoms.net_wm_state_demands_attention)
self->demands_attention = TRUE;
- else if (state[i] == prop_atoms.ob_wm_state_undecorated)
+ else if (state[i] == prop_atoms.openbox_wm_state_undecorated)
self->undecorated = TRUE;
}
if (self->demands_attention)
netstate[num++] = prop_atoms.net_wm_state_demands_attention;
if (self->undecorated)
- netstate[num++] = prop_atoms.ob_wm_state_undecorated;
+ netstate[num++] = prop_atoms.openbox_wm_state_undecorated;
PROP_SETA32(self->window, net_wm_state, atom, netstate, num);
if (self->frame)
action = self->demands_attention ?
prop_atoms.net_wm_state_remove :
prop_atoms.net_wm_state_add;
- else if (state == prop_atoms.ob_wm_state_undecorated)
+ else if (state == prop_atoms.openbox_wm_state_undecorated)
action = undecorated ? prop_atoms.net_wm_state_remove :
prop_atoms.net_wm_state_add;
}
self->below = TRUE;
} else if (state == prop_atoms.net_wm_state_demands_attention) {
demands_attention = TRUE;
- } else if (state == prop_atoms.ob_wm_state_undecorated) {
+ } else if (state == prop_atoms.openbox_wm_state_undecorated) {
undecorated = TRUE;
}
self->below = FALSE;
} else if (state == prop_atoms.net_wm_state_demands_attention) {
demands_attention = FALSE;
- } else if (state == prop_atoms.ob_wm_state_undecorated) {
+ } else if (state == prop_atoms.openbox_wm_state_undecorated) {
undecorated = FALSE;
}
}
screen_set_num_desktops(d);
} else if (msgtype == prop_atoms.net_showing_desktop) {
screen_show_desktop(e->xclient.data.l[0] != 0, TRUE);
- } else if (msgtype == prop_atoms.ob_control) {
+ } else if (msgtype == prop_atoms.openbox_control) {
if (e->xclient.data.l[0] == 1)
ob_reconfigure();
else if (e->xclient.data.l[0] == 2)
vals[3] = self->size.bottom;
PROP_SETA32(self->client->window, net_frame_extents,
cardinal, vals, 4);
+ PROP_SETA32(self->client->window, kde_net_wm_frame_strut,
+ cardinal, vals, 4);
}
/* if this occurs while we are focus cycling, the indicator needs to
* remote_control = 1 -> reconfigure
* remote_control = 2 -> restart */
PROP_MSG(RootWindow(ob_display, ob_screen),
- ob_control, remote_control, 0, 0, 0);
+ openbox_control, remote_control, 0, 0, 0);
XCloseDisplay(ob_display);
exit(EXIT_SUCCESS);
}
CREATE(net_current_desktop, "_NET_CURRENT_DESKTOP");
CREATE(net_desktop_names, "_NET_DESKTOP_NAMES");
CREATE(net_active_window, "_NET_ACTIVE_WINDOW");
+/* CREATE(net_restack_window, "_NET_RESTACK_WINDOW");*/
CREATE(net_workarea, "_NET_WORKAREA");
CREATE(net_supporting_wm_check, "_NET_SUPPORTING_WM_CHECK");
CREATE(net_desktop_layout, "_NET_DESKTOP_LAYOUT");
/* CREATE(net_wm_pid, "_NET_WM_PID"); */
CREATE(net_wm_allowed_actions, "_NET_WM_ALLOWED_ACTIONS");
CREATE(net_wm_user_time, "_NET_WM_USER_TIME");
+ CREATE(kde_net_wm_frame_strut, "_KDE_NET_WM_FRAME_STRUT");
CREATE(net_frame_extents, "_NET_FRAME_EXTENTS");
/* CREATE(net_wm_ping, "_NET_WM_PING"); */
CREATE(net_wm_action_change_desktop, "_NET_WM_ACTION_CHANGE_DESKTOP");
CREATE(net_wm_action_close, "_NET_WM_ACTION_CLOSE");
CREATE(net_wm_state_modal, "_NET_WM_STATE_MODAL");
- CREATE(net_wm_state_sticky, "_NET_WM_STATE_STICKY");
+/* CREATE(net_wm_state_sticky, "_NET_WM_STATE_STICKY");*/
CREATE(net_wm_state_maximized_vert, "_NET_WM_STATE_MAXIMIZED_VERT");
CREATE(net_wm_state_maximized_horz, "_NET_WM_STATE_MAXIMIZED_HORZ");
CREATE(net_wm_state_shaded, "_NET_WM_STATE_SHADED");
CREATE(kde_wm_change_state, "_KDE_WM_CHANGE_STATE");
CREATE(kde_net_wm_window_type_override,"_KDE_NET_WM_WINDOW_TYPE_OVERRIDE");
+/*
CREATE(rootpmapid, "_XROOTPMAP_ID");
CREATE(esetrootid, "ESETROOT_PMAP_ID");
+*/
CREATE(openbox_pid, "_OPENBOX_PID");
CREATE(openbox_rc, "_OPENBOX_RC");
- CREATE(ob_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED");
- CREATE(ob_control, "_OB_CONTROL");
+ CREATE(openbox_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED");
+ CREATE(openbox_control, "_OB_CONTROL");
}
#include <X11/Xutil.h>
/* NETWM atoms */
- Atom net_wm_full_placement;
+ /* Atoms that are used inside messages - these don't go in net_supported */
+
+ Atom net_wm_moveresize_size_topleft;
+ Atom net_wm_moveresize_size_top;
+ Atom net_wm_moveresize_size_topright;
+ Atom net_wm_moveresize_size_right;
+ Atom net_wm_moveresize_size_bottomright;
+ Atom net_wm_moveresize_size_bottom;
+ Atom net_wm_moveresize_size_bottomleft;
+ Atom net_wm_moveresize_size_left;
+ Atom net_wm_moveresize_move;
+ Atom net_wm_moveresize_size_keyboard;
+ Atom net_wm_moveresize_move_keyboard;
+ Atom net_wm_moveresize_cancel;
+
+ Atom net_wm_state_add;
+ Atom net_wm_state_remove;
+ Atom net_wm_state_toggle;
+
+ Atom net_wm_orientation_horz;
+ Atom net_wm_orientation_vert;
+ Atom net_wm_topleft;
+ Atom net_wm_topright;
+ Atom net_wm_bottomright;
+ Atom net_wm_bottomleft;
+
+ /* Everything below here must go in net_supported on the root window */
/* root window properties */
Atom net_supported;
Atom net_current_desktop;
Atom net_desktop_names;
Atom net_active_window;
+/* Atom net_restack_window;*/
Atom net_workarea;
Atom net_supporting_wm_check;
Atom net_desktop_layout;
Atom net_showing_desktop;
+
/* root window messages */
Atom net_close_window;
Atom net_wm_moveresize;
Atom net_moveresize_window;
+ /* helpful hints to apps that aren't used for anything */
+ Atom net_wm_full_placement;
+
/* startup-notification extension */
Atom net_startup_id;
Atom net_wm_window_type_dialog;
Atom net_wm_window_type_normal;
- Atom net_wm_moveresize_size_topleft;
- Atom net_wm_moveresize_size_top;
- Atom net_wm_moveresize_size_topright;
- Atom net_wm_moveresize_size_right;
- Atom net_wm_moveresize_size_bottomright;
- Atom net_wm_moveresize_size_bottom;
- Atom net_wm_moveresize_size_bottomleft;
- Atom net_wm_moveresize_size_left;
- Atom net_wm_moveresize_move;
- Atom net_wm_moveresize_size_keyboard;
- Atom net_wm_moveresize_move_keyboard;
- Atom net_wm_moveresize_cancel;
-
Atom net_wm_action_move;
Atom net_wm_action_resize;
Atom net_wm_action_minimize;
Atom net_wm_action_close;
Atom net_wm_state_modal;
- Atom net_wm_state_sticky;
+/* Atom net_wm_state_sticky;*/
Atom net_wm_state_maximized_vert;
Atom net_wm_state_maximized_horz;
Atom net_wm_state_shaded;
Atom net_wm_state_below;
Atom net_wm_state_demands_attention;
- Atom net_wm_state_add;
- Atom net_wm_state_remove;
- Atom net_wm_state_toggle;
-
- Atom net_wm_orientation_horz;
- Atom net_wm_orientation_vert;
- Atom net_wm_topleft;
- Atom net_wm_topright;
- Atom net_wm_bottomright;
- Atom net_wm_bottomleft;
-
- /* Extra atoms */
+ /* KDE atoms */
Atom kde_wm_change_state;
+ Atom kde_net_wm_frame_strut;
Atom kde_net_wm_window_type_override;
+/*
Atom rootpmapid;
Atom esetrootid;
+*/
/* Openbox specific atoms */
+ Atom openbox_wm_state_undecorated;
Atom openbox_pid;
Atom openbox_rc;
- Atom ob_wm_state_undecorated;
- Atom ob_control;
+ Atom openbox_control;
} Atoms;
Atoms prop_atoms;
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_rc;
+ supported[i++] = prop_atoms.openbox_control;
g_assert(i == num_support);
PROP_SETA32(RootWindow(ob_display, ob_screen),