make the obt library branch compile again with all the changes merged in from backport
This commit is contained in:
parent
8439c393d8
commit
ea481338b5
12 changed files with 41 additions and 40 deletions
|
@ -197,7 +197,7 @@ KeyCode obt_keyboard_keysym_to_keycode(KeySym sym)
|
|||
return 0;
|
||||
}
|
||||
|
||||
const gchar *obt_keyboard_keycode_to_string(guint keycode)
|
||||
gchar *obt_keyboard_keycode_to_string(guint keycode)
|
||||
{
|
||||
KeySym sym;
|
||||
const gchar *ret = NULL;
|
||||
|
@ -211,7 +211,7 @@ gunichar obt_keyboard_keycode_to_unichar(guint keycode)
|
|||
{
|
||||
gunichar unikey = 0;
|
||||
|
||||
const char *key;
|
||||
char *key;
|
||||
if ((key = obt_keyboard_keycode_to_string(keycode)) != NULL &&
|
||||
/* don't accept keys that aren't a single letter, like "space" */
|
||||
key[1] == '\0')
|
||||
|
|
|
@ -59,7 +59,7 @@ guint obt_keyboard_modkey_to_modmask(ObtModkeysKey key);
|
|||
KeyCode obt_keyboard_keysym_to_keycode(KeySym sym);
|
||||
|
||||
/*! Give the string form of a KeyCode */
|
||||
const gchar *obt_keyboard_keycode_to_string(guint keycode);
|
||||
gchar *obt_keyboard_keycode_to_string(guint keycode);
|
||||
|
||||
/*! Translate a KeyCode to the unicode character it represents */
|
||||
gunichar obt_keyboard_keycode_to_unichar(guint keycode);
|
||||
|
|
|
@ -536,7 +536,7 @@ static void insert_timer(ObtMainLoop *loop, ObtMainLoopTimer *ins)
|
|||
{
|
||||
GSList *it;
|
||||
for (it = loop->timers; it; it = g_slist_next(it)) {
|
||||
ObMainLoopTimer *t = it->data;
|
||||
ObtMainLoopTimer *t = it->data;
|
||||
if (timecompare(&ins->timeout, &t->timeout) <= 0) {
|
||||
loop->timers = g_slist_insert_before(loop->timers, it, ins);
|
||||
break;
|
||||
|
@ -553,7 +553,7 @@ void obt_main_loop_timeout_add(ObtMainLoop *loop,
|
|||
GEqualFunc cmp,
|
||||
GDestroyNotify notify)
|
||||
{
|
||||
ObMainLoopTimer *t = g_new(ObMainLoopTimer, 1);
|
||||
ObtMainLoopTimer *t = g_new(ObtMainLoopTimer, 1);
|
||||
|
||||
g_assert(microseconds > 0); /* if it's 0 it'll cause an infinite loop */
|
||||
|
||||
|
|
|
@ -267,10 +267,10 @@ void obt_prop_message_to(Window to, Window about, Atom messagetype,
|
|||
data0, data1, data2, data3, data4, \
|
||||
SubstructureNotifyMask | SubstructureRedirectMask))
|
||||
|
||||
#define OBT_PROP_MSG(to, about, msgtype, data0, data1, data2, data3, \
|
||||
data4, mask) \
|
||||
(obt_prop_message_to(to, OBT_PROP_ATOM(msgtype), \
|
||||
data0, data1, data2, data3, data4, mask))
|
||||
#define OBT_PROP_MSG_TO(to, about, msgtype, data0, data1, data2, data3, \
|
||||
data4, mask) \
|
||||
(obt_prop_message_to(to, about, OBT_PROP_ATOM(msgtype), \
|
||||
data0, data1, data2, data3, data4, mask))
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -783,8 +783,8 @@ void client_unmanage(ObClient *self)
|
|||
|
||||
/* these should not be left on the window ever. other window managers
|
||||
don't necessarily use them and it will mess them up (like compiz) */
|
||||
PROP_ERASE(self->window, net_wm_visible_name);
|
||||
PROP_ERASE(self->window, net_wm_visible_icon_name);
|
||||
OBT_PROP_ERASE(self->window, NET_WM_VISIBLE_NAME);
|
||||
OBT_PROP_ERASE(self->window, NET_WM_VISIBLE_ICON_NAME);
|
||||
|
||||
/* update the list hints */
|
||||
client_set_list();
|
||||
|
@ -1528,7 +1528,7 @@ void client_update_protocols(ObClient *self)
|
|||
/* if this protocol is requested, then the window will be
|
||||
notified whenever we want it to receive focus */
|
||||
self->focus_notify = TRUE;
|
||||
else if (proto[i] == prop_atoms.net_wm_ping)
|
||||
else if (proto[i] == OBT_PROP_ATOM(NET_WM_PING))
|
||||
/* if this protocol is requested, then the window will allow
|
||||
pings to determine if it is still alive */
|
||||
self->ping = TRUE;
|
||||
|
@ -2282,7 +2282,7 @@ static void client_get_session_ids(ObClient *self)
|
|||
|
||||
/* see if it has the PID set too (the PID requires that the
|
||||
WM_CLIENT_MACHINE be set) */
|
||||
if (PROP_GET32(self->window, net_wm_pid, cardinal, &pid))
|
||||
if (OBT_PROP_GET32(self->window, NET_WM_PID, CARDINAL, &pid))
|
||||
self->pid = pid;
|
||||
}
|
||||
}
|
||||
|
@ -3240,8 +3240,8 @@ void client_close(ObClient *self)
|
|||
else
|
||||
/* request the client to close with WM_DELETE_WINDOW */
|
||||
OBT_PROP_MSG_TO(self->window, self->window, WM_PROTOCOLS,
|
||||
OBT_PROP_ATOM(WM_DELETE_WINDOW), event_curtime, 0, 0,
|
||||
NoEventMask);
|
||||
OBT_PROP_ATOM(WM_DELETE_WINDOW), event_curtime,
|
||||
0, 0, 0, NoEventMask);
|
||||
}
|
||||
|
||||
void client_kill(ObClient *self)
|
||||
|
|
|
@ -226,7 +226,7 @@ static void parse_per_app_settings(xmlNodePtr node, gpointer d)
|
|||
}
|
||||
|
||||
if (x_pos_given && (c = obt_parse_find_node(n->children, "y")))
|
||||
if (!obt_parse_node_contains("default", doc, c)) {
|
||||
if (!obt_parse_node_contains(c, "default")) {
|
||||
config_parse_gravity_coord(c, &settings->position.y);
|
||||
settings->pos_given = TRUE;
|
||||
}
|
||||
|
|
|
@ -644,8 +644,7 @@ static void event_process(const XEvent *ec, gpointer data)
|
|||
/* keyboard layout changes for modifier mapping changes. reload the
|
||||
modifier map, and rebind all the key bindings as appropriate */
|
||||
ob_debug("Kepboard map changed. Reloading keyboard bindings.\n");
|
||||
modkeys_shutdown(TRUE);
|
||||
modkeys_startup(TRUE);
|
||||
obt_keyboard_reload();
|
||||
keyboard_rebind();
|
||||
}
|
||||
else if (e->type == ClientMessage) {
|
||||
|
@ -769,8 +768,8 @@ static void event_handle_root(XEvent *e)
|
|||
ob_restart();
|
||||
else if (e->xclient.data.l[0] == 3)
|
||||
ob_exit(0);
|
||||
} else if (msgtype == prop_atoms.wm_protocols) {
|
||||
if ((Atom)e->xclient.data.l[0] == prop_atoms.net_wm_ping)
|
||||
} else if (msgtype == OBT_PROP_ATOM(WM_PROTOCOLS)) {
|
||||
if ((Atom)e->xclient.data.l[0] == OBT_PROP_ATOM(NET_WM_PING))
|
||||
ping_got_pong(e->xclient.data.l[1]);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "group.h"
|
||||
#include "config.h"
|
||||
#include "ping.h"
|
||||
#include "mainloop.h"
|
||||
#include "gettext.h"
|
||||
#include "render/render.h"
|
||||
#include "render/theme.h"
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
|
||||
#include "ping.h"
|
||||
#include "client.h"
|
||||
#include "prop.h"
|
||||
#include "event.h"
|
||||
#include "debug.h"
|
||||
#include "mainloop.h"
|
||||
#include "openbox.h"
|
||||
#include "obt/mainloop.h"
|
||||
#include "obt/prop.h"
|
||||
|
||||
typedef struct _ObPingTarget
|
||||
{
|
||||
|
@ -78,8 +78,8 @@ void ping_start(struct _ObClient *client, ObPingEventHandler h)
|
|||
t->client = client;
|
||||
t->h = h;
|
||||
|
||||
ob_main_loop_timeout_add(ob_main_loop, PING_TIMEOUT, ping_timeout,
|
||||
t, g_direct_equal, NULL);
|
||||
obt_main_loop_timeout_add(ob_main_loop, PING_TIMEOUT, ping_timeout,
|
||||
t, g_direct_equal, NULL);
|
||||
/* act like we just timed out immediately, to start the pinging process
|
||||
now instead of after the first delay. this makes sure the client
|
||||
ends up in the ping_ids hash table now. */
|
||||
|
@ -132,9 +132,9 @@ static void ping_send(ObPingTarget *t)
|
|||
}
|
||||
|
||||
/*ob_debug("+PING: '%s' (id %u)\n", t->client->title, t->id);*/
|
||||
PROP_MSG_TO(t->client->window, t->client->window, wm_protocols,
|
||||
prop_atoms.net_wm_ping, t->id, t->client->window, 0, 0,
|
||||
NoEventMask);
|
||||
OBT_PROP_MSG_TO(t->client->window, t->client->window, WM_PROTOCOLS,
|
||||
OBT_PROP_ATOM(NET_WM_PING), t->id, t->client->window, 0, 0,
|
||||
NoEventMask);
|
||||
}
|
||||
|
||||
static gboolean ping_timeout(gpointer data)
|
||||
|
@ -159,7 +159,8 @@ static void ping_end(ObClient *client, gpointer data)
|
|||
if ((t = g_hash_table_find(ping_ids, find_client, client))) {
|
||||
g_hash_table_remove(ping_ids, &t->id);
|
||||
|
||||
ob_main_loop_timeout_remove_data(ob_main_loop, ping_timeout, t, FALSE);
|
||||
obt_main_loop_timeout_remove_data(ob_main_loop, ping_timeout,
|
||||
t, FALSE);
|
||||
|
||||
g_free(t);
|
||||
}
|
||||
|
|
|
@ -19,10 +19,12 @@
|
|||
#ifndef ob__resist_h
|
||||
#define ob__resist_h
|
||||
|
||||
struct _ObClient;
|
||||
#include "misc.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
struct _ObClient;
|
||||
|
||||
/*! @x The client's x destination (in the client's coordinates, not the frame's
|
||||
@y The client's y destination (in the client's coordinates, not the frame's
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "startupnotify.h"
|
||||
#include "moveresize.h"
|
||||
#include "config.h"
|
||||
#include "mainloop.h"
|
||||
#include "screen.h"
|
||||
#include "client.h"
|
||||
#include "session.h"
|
||||
|
@ -36,6 +35,7 @@
|
|||
#include "gettext.h"
|
||||
#include "obt/display.h"
|
||||
#include "obt/prop.h"
|
||||
#include "obt/mainloop.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
@ -661,9 +661,9 @@ void screen_set_desktop(guint num, gboolean dofocus)
|
|||
}
|
||||
}
|
||||
screen_desktop_timeout = FALSE;
|
||||
ob_main_loop_timeout_remove(ob_main_loop, last_desktop_func);
|
||||
ob_main_loop_timeout_add(ob_main_loop, REMEMBER_LAST_DESKTOP_TIME,
|
||||
last_desktop_func, NULL, NULL, NULL);
|
||||
obt_main_loop_timeout_remove(ob_main_loop, last_desktop_func);
|
||||
obt_main_loop_timeout_add(ob_main_loop, REMEMBER_LAST_DESKTOP_TIME,
|
||||
last_desktop_func, NULL, NULL, NULL);
|
||||
|
||||
ob_debug("Moving to desktop %d\n", num+1);
|
||||
|
||||
|
@ -922,15 +922,15 @@ void screen_show_desktop_popup(guint d)
|
|||
MAX(a->width/3, POPUP_WIDTH));
|
||||
pager_popup_show(desktop_popup, screen_desktop_names[d], d);
|
||||
|
||||
ob_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
|
||||
ob_main_loop_timeout_add(ob_main_loop, config_desktop_popup_time * 1000,
|
||||
hide_desktop_popup_func, NULL, NULL, NULL);
|
||||
obt_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
|
||||
obt_main_loop_timeout_add(ob_main_loop, config_desktop_popup_time * 1000,
|
||||
hide_desktop_popup_func, NULL, NULL, NULL);
|
||||
g_free(a);
|
||||
}
|
||||
|
||||
void screen_hide_desktop_popup(void)
|
||||
{
|
||||
ob_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
|
||||
obt_main_loop_timeout_remove(ob_main_loop, hide_desktop_popup_func);
|
||||
pager_popup_hide(desktop_popup);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ void stacking_temp_raise(ObWindow *window)
|
|||
}
|
||||
|
||||
win[1] = window_top(window);
|
||||
XRestackWindows(ob_display, win, 2);
|
||||
XRestackWindows(obt_display, win, 2);
|
||||
|
||||
pause_changes = TRUE;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ void stacking_restore(void)
|
|||
win[0] = screen_support_win;
|
||||
for (i = 1, it = stacking_list; it; ++i, it = g_list_next(it))
|
||||
win[i] = window_top(it->data);
|
||||
XRestackWindows(ob_display, win, i);
|
||||
XRestackWindows(obt_display, win, i);
|
||||
g_free(win);
|
||||
|
||||
pause_changes = FALSE;
|
||||
|
|
Loading…
Reference in a new issue