X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fprop.c;h=efb46bd442346028def8eb873107190bdab731f3;hb=e5d6a552a46bce27cbe25c92023094b44c9a8284;hp=977dbe957e6af204988c2bed44643b5bb88aff37;hpb=bd19fd06db8905ef835109414314ef928370a7d7;p=chaz%2Fopenbox diff --git a/openbox/prop.c b/openbox/prop.c index 977dbe95..efb46bd4 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -2,7 +2,7 @@ prop.c for the Openbox window manager Copyright (c) 2006 Mikael Magnusson - Copyright (c) 2003 Ben Jansens + Copyright (c) 2003-2007 Dana Jansens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -48,10 +48,13 @@ void prop_startup() CREATE(wm_icon_name, "WM_ICON_NAME"); CREATE(wm_class, "WM_CLASS"); CREATE(wm_window_role, "WM_WINDOW_ROLE"); + CREATE(wm_client_machine, "WM_CLIENT_MACHINE"); CREATE(motif_wm_hints, "_MOTIF_WM_HINTS"); CREATE(sm_client_id, "SM_CLIENT_ID"); + CREATE(net_wm_full_placement, "_NET_WM_FULL_PLACEMENT"); + CREATE(net_supported, "_NET_SUPPORTED"); CREATE(net_client_list, "_NET_CLIENT_LIST"); CREATE(net_client_list_stacking, "_NET_CLIENT_LIST_STACKING"); @@ -84,10 +87,15 @@ void prop_startup() CREATE(net_wm_icon, "_NET_WM_ICON"); /* 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(net_frame_extents, "_NET_FRAME_EXTENTS"); /* CREATE(net_wm_ping, "_NET_WM_PING"); */ - +#ifdef SYNC + CREATE(net_wm_sync_request, "_NET_WM_SYNC_REQUEST"); + CREATE(net_wm_sync_request_counter, "_NET_WM_SYNC_REQUEST_COUNTER"); +#endif + CREATE(net_wm_window_type_desktop, "_NET_WM_WINDOW_TYPE_DESKTOP"); CREATE(net_wm_window_type_dock, "_NET_WM_WINDOW_TYPE_DOCK"); CREATE(net_wm_window_type_toolbar, "_NET_WM_WINDOW_TYPE_TOOLBAR"); @@ -108,12 +116,12 @@ void prop_startup() prop_atoms.net_wm_moveresize_move = 8; prop_atoms.net_wm_moveresize_size_keyboard = 9; prop_atoms.net_wm_moveresize_move_keyboard = 10; + prop_atoms.net_wm_moveresize_cancel = 11; CREATE(net_wm_action_move, "_NET_WM_ACTION_MOVE"); CREATE(net_wm_action_resize, "_NET_WM_ACTION_RESIZE"); CREATE(net_wm_action_minimize, "_NET_WM_ACTION_MINIMIZE"); CREATE(net_wm_action_shade, "_NET_WM_ACTION_SHADE"); - CREATE(net_wm_action_stick, "_NET_WM_ACTION_STICK"); CREATE(net_wm_action_maximize_horz, "_NET_WM_ACTION_MAXIMIZE_HORZ"); CREATE(net_wm_action_maximize_vert, "_NET_WM_ACTION_MAXIMIZE_VERT"); CREATE(net_wm_action_fullscreen, "_NET_WM_ACTION_FULLSCREEN"); @@ -150,6 +158,7 @@ void prop_startup() 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"); } @@ -293,8 +302,7 @@ gboolean prop_get_string_locale(Window win, Atom prop, gchar **ret) gchar *s; if (get_stringlist(win, prop, &list, &nstr) && nstr) { - s = g_convert(list[0], strlen(list[0]), "UTF-8", "ISO-8859-1", - NULL, NULL, NULL); + s = g_locale_to_utf8(list[0], -1, NULL, NULL, NULL); XFreeStringList(list); if (s) { *ret = s; @@ -323,8 +331,7 @@ gboolean prop_get_strings_locale(Window win, Atom prop, gchar ***ret) (*ret)[count] = NULL; /* null terminated list */ for (i = 0, it = strs; it; ++i, it = g_slist_next(it)) { - (*ret)[i] = g_convert(it->data, -1, "UTF-8", "ISO-8859-1", - NULL, NULL, NULL); + (*ret)[i] = g_locale_to_utf8(it->data, -1, NULL, NULL, NULL); /* make sure translation did not fail */ if (!(*ret)[i]) (*ret)[i] = g_strdup(""); @@ -397,10 +404,10 @@ void prop_set_array32(Window win, Atom prop, Atom type, gulong *val, (guchar*)val, num); } -void prop_set_string_utf8(Window win, Atom prop, gchar *val) +void prop_set_string_utf8(Window win, Atom prop, const gchar *val) { XChangeProperty(ob_display, win, prop, prop_atoms.utf8, 8, - PropModeReplace, (guchar*)val, strlen(val)); + PropModeReplace, (const guchar*)val, strlen(val)); } void prop_set_strings_utf8(Window win, Atom prop, gchar **strs)