Fixed GCC compiler warnings.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@463 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
f0168fd330
commit
c86e12e6dc
19
ewmhints.c
19
ewmhints.c
@ -90,11 +90,11 @@ static int
|
|||||||
get_current_desktop(void)
|
get_current_desktop(void)
|
||||||
{
|
{
|
||||||
unsigned long nitems_return;
|
unsigned long nitems_return;
|
||||||
uint32 *prop_return;
|
unsigned char *prop_return;
|
||||||
int current_desktop;
|
int current_desktop;
|
||||||
|
|
||||||
if (get_property_value("_NET_CURRENT_DESKTOP", 1, &nitems_return,
|
if (get_property_value("_NET_CURRENT_DESKTOP", 1, &nitems_return,
|
||||||
(unsigned char **) &prop_return) < 0)
|
&prop_return) < 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (nitems_return != 1)
|
if (nitems_return != 1)
|
||||||
@ -118,7 +118,8 @@ get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height)
|
|||||||
{
|
{
|
||||||
int current_desktop;
|
int current_desktop;
|
||||||
unsigned long nitems_return;
|
unsigned long nitems_return;
|
||||||
uint32 *prop_return;
|
unsigned char *prop_return;
|
||||||
|
uint32 *return_words;
|
||||||
const uint32 net_workarea_x_offset = 0;
|
const uint32 net_workarea_x_offset = 0;
|
||||||
const uint32 net_workarea_y_offset = 1;
|
const uint32 net_workarea_y_offset = 1;
|
||||||
const uint32 net_workarea_width_offset = 2;
|
const uint32 net_workarea_width_offset = 2;
|
||||||
@ -126,7 +127,7 @@ get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height)
|
|||||||
const uint32 max_prop_length = 32 * 4; /* Max 32 desktops */
|
const uint32 max_prop_length = 32 * 4; /* Max 32 desktops */
|
||||||
|
|
||||||
if (get_property_value("_NET_WORKAREA", max_prop_length, &nitems_return,
|
if (get_property_value("_NET_WORKAREA", max_prop_length, &nitems_return,
|
||||||
(unsigned char **) &prop_return) < 0)
|
&prop_return) < 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (nitems_return % 4)
|
if (nitems_return % 4)
|
||||||
@ -140,10 +141,12 @@ get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height)
|
|||||||
if (current_desktop < 0)
|
if (current_desktop < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
*x = prop_return[current_desktop * 4 + net_workarea_x_offset];
|
return_words = (uint32 *)prop_return;
|
||||||
*y = prop_return[current_desktop * 4 + net_workarea_y_offset];
|
|
||||||
*width = prop_return[current_desktop * 4 + net_workarea_width_offset];
|
*x = return_words[current_desktop * 4 + net_workarea_x_offset];
|
||||||
*height = prop_return[current_desktop * 4 + net_workarea_height_offset];
|
*y = return_words[current_desktop * 4 + net_workarea_y_offset];
|
||||||
|
*width = return_words[current_desktop * 4 + net_workarea_width_offset];
|
||||||
|
*height = return_words[current_desktop * 4 + net_workarea_height_offset];
|
||||||
|
|
||||||
XFree(prop_return);
|
XFree(prop_return);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user