X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fprop.c;h=6c103e6df0e9a28db1de1218a65ad1dd81bed7e3;hb=ca9fe26a6b169c905d990c55a642ba5f00a791a0;hp=f6559c400c722df6e870063f71b27dc539e5aa4e;hpb=335e8acbfc5d2824f1fd2cb67a5add8e1ed40b06;p=chaz%2Fopenbox diff --git a/openbox/prop.c b/openbox/prop.c index f6559c40..6c103e6d 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -1,6 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- prop.c for the Openbox window manager + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -151,6 +152,7 @@ void prop_startup() CREATE(openbox_pid, "_OPENBOX_PID"); CREATE(ob_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED"); + CREATE(ob_control, "_OB_CONTROL"); } #include @@ -206,7 +208,7 @@ static gboolean get_prealloc(Window win, Atom prop, Atom type, gint size, data[i] = xdata[i]; break; case 16: - ((guint16*)data)[i] = ((guint16*)xdata)[i]; + ((guint16*)data)[i] = ((gushort*)xdata)[i]; break; case 32: ((guint32*)data)[i] = ((gulong*)xdata)[i]; @@ -245,7 +247,7 @@ static gboolean get_all(Window win, Atom prop, Atom type, gint size, (*data)[i] = xdata[i]; break; case 16: - ((guint16*)*data)[i] = ((guint16*)xdata)[i]; + ((guint16*)*data)[i] = ((gushort*)xdata)[i]; break; case 32: ((guint32*)*data)[i] = ((gulong*)xdata)[i]; @@ -383,13 +385,13 @@ gboolean prop_get_strings_utf8(Window win, Atom prop, gchar ***ret) return FALSE; } -void prop_set32(Window win, Atom prop, Atom type, guint32 val) +void prop_set32(Window win, Atom prop, Atom type, gulong val) { XChangeProperty(ob_display, win, prop, type, 32, PropModeReplace, (guchar*)&val, 1); } -void prop_set_array32(Window win, Atom prop, Atom type, guint32 *val, +void prop_set_array32(Window win, Atom prop, Atom type, gulong *val, guint num) { XChangeProperty(ob_display, win, prop, type, 32, PropModeReplace,