mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
*** empty log message ***
This commit is contained in:
parent
59d99fb9d1
commit
ea50cc7239
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
||||
2006-04-13 Björn Lindqvist <bjourne@gmail.com>
|
||||
|
||||
* src/async-getprop.c, src/async-getprop.h
|
||||
(async_get_property_handler, ag_task_get_reply_and_free):
|
||||
* src/testasyncgetprop.c (try_get_reply, run_speed_comparison):
|
||||
Change unsigned chars to chars.
|
||||
|
||||
* src/display.h (struct MetaDisplay):
|
||||
* src/keybindings.c (reload_modmap):
|
||||
Change unsigned ints to ints.
|
||||
|
||||
* src/screen.c (set_workspace_names)
|
||||
* src/stack.c (meta_stack_sync_to_server):
|
||||
* src/xprops.c (utf8_string_from_results, utf8_list_from_results,
|
||||
class_hint_from_results, meta_prop_get_values):
|
||||
Introduce casts.
|
||||
|
||||
Add a number of casts and change signedness on a number of
|
||||
variables so that Metacity compiles with many fewer
|
||||
warnings. Fixes #336032.
|
||||
|
||||
2006-04-12 Elijah Newren <newren gmail com>
|
||||
|
||||
Patch from Ron Yorston to add a focus_new_windows option. Default
|
||||
|
@ -66,7 +66,7 @@ struct _AgGetPropertyTask
|
||||
|
||||
unsigned long n_items;
|
||||
unsigned long bytes_after;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
|
||||
Bool have_reply;
|
||||
};
|
||||
@ -316,7 +316,7 @@ async_get_property_handler (Display *dpy,
|
||||
/* there's padding to word boundary */
|
||||
netbytes = ALIGN_VALUE (nbytes, 4);
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
(task->data = (char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
{
|
||||
#ifdef DEBUG_SPEW
|
||||
printf ("%s: already read %d bytes using %ld, more eating %ld more\n",
|
||||
@ -334,7 +334,7 @@ async_get_property_handler (Display *dpy,
|
||||
netbytes = reply->nItems << 1;
|
||||
netbytes = ALIGN_VALUE (netbytes, 4); /* align to word boundary */
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
(task->data = (char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
{
|
||||
#ifdef DEBUG_SPEW
|
||||
printf ("%s: already read %d bytes using %ld more, eating %ld more\n",
|
||||
@ -351,7 +351,7 @@ async_get_property_handler (Display *dpy,
|
||||
nbytes = reply->nItems * sizeof (long);
|
||||
netbytes = reply->nItems << 2; /* wire size is always 32 bits though */
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
(task->data = (char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
{
|
||||
#ifdef DEBUG_SPEW
|
||||
printf ("%s: already read %d bytes using %ld more, eating %ld more\n",
|
||||
@ -363,9 +363,9 @@ async_get_property_handler (Display *dpy,
|
||||
*/
|
||||
if (sizeof (long) == 8)
|
||||
{
|
||||
unsigned char *netdata;
|
||||
unsigned char *lptr;
|
||||
unsigned char *end_lptr;
|
||||
char *netdata;
|
||||
char *lptr;
|
||||
char *end_lptr;
|
||||
|
||||
/* Store the 32-bit values in the end of the array */
|
||||
netdata = task->data + nbytes / 2;
|
||||
@ -584,7 +584,7 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
|
||||
int *actual_format,
|
||||
unsigned long *nitems,
|
||||
unsigned long *bytesafter,
|
||||
unsigned char **prop)
|
||||
char **prop)
|
||||
{
|
||||
Display *dpy;
|
||||
|
||||
|
@ -45,7 +45,7 @@ Status ag_task_get_reply_and_free (AgGetPropertyTask *task,
|
||||
int *actual_format,
|
||||
unsigned long *nitems,
|
||||
unsigned long *bytesafter,
|
||||
unsigned char **prop);
|
||||
char **prop);
|
||||
|
||||
Bool ag_task_have_reply (AgGetPropertyTask *task);
|
||||
Atom ag_task_get_property (AgGetPropertyTask *task);
|
||||
|
@ -295,8 +295,8 @@ struct _MetaDisplay
|
||||
int n_screen_bindings;
|
||||
MetaKeyBinding *window_bindings;
|
||||
int n_window_bindings;
|
||||
unsigned int min_keycode;
|
||||
unsigned int max_keycode;
|
||||
int min_keycode;
|
||||
int max_keycode;
|
||||
KeySym *keymap;
|
||||
int keysyms_per_keycode;
|
||||
XModifierKeymap *modmap;
|
||||
|
@ -465,7 +465,7 @@ reload_modmap (MetaDisplay *display)
|
||||
/* get the key code at this point in the map,
|
||||
* see if its keysym is one we're interested in
|
||||
*/
|
||||
unsigned int keycode = modmap->modifiermap[i];
|
||||
int keycode = modmap->modifiermap[i];
|
||||
|
||||
if (keycode >= display->min_keycode &&
|
||||
keycode <= display->max_keycode)
|
||||
|
@ -1760,7 +1760,7 @@ set_workspace_names (MetaScreen *screen)
|
||||
screen->display->atom_net_desktop_names,
|
||||
screen->display->atom_utf8_string,
|
||||
8, PropModeReplace,
|
||||
flattened->str, flattened->len);
|
||||
(unsigned char *)flattened->str, flattened->len);
|
||||
meta_error_trap_pop (screen->display, FALSE);
|
||||
|
||||
g_string_free (flattened, TRUE);
|
||||
|
@ -1196,14 +1196,14 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
stack->screen->display->atom_net_client_list,
|
||||
XA_WINDOW,
|
||||
32, PropModeReplace,
|
||||
stack->windows->data,
|
||||
(unsigned char *)stack->windows->data,
|
||||
stack->windows->len);
|
||||
XChangeProperty (stack->screen->display->xdisplay,
|
||||
stack->screen->xroot,
|
||||
stack->screen->display->atom_net_client_list_stacking,
|
||||
XA_WINDOW,
|
||||
32, PropModeReplace,
|
||||
stacked->data,
|
||||
(unsigned char *)stacked->data,
|
||||
stacked->len);
|
||||
|
||||
g_array_free (stacked, TRUE);
|
||||
|
@ -185,7 +185,7 @@ try_get_reply (Display *xdisplay,
|
||||
int actual_format;
|
||||
unsigned long n_items;
|
||||
unsigned long bytes_after;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
char *name;
|
||||
struct timeval current_time;
|
||||
|
||||
@ -419,7 +419,7 @@ run_speed_comparison (Display *xdisplay,
|
||||
int actual_format;
|
||||
unsigned long n_items;
|
||||
unsigned long bytes_after;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
|
||||
assert (ag_task_have_reply (task));
|
||||
|
||||
|
12
src/xprops.c
12
src/xprops.c
@ -391,7 +391,7 @@ utf8_string_from_results (GetPropertyResults *results,
|
||||
return FALSE;
|
||||
|
||||
if (results->n_items > 0 &&
|
||||
!g_utf8_validate (results->prop, results->n_items, NULL))
|
||||
!g_utf8_validate ((gchar *)results->prop, results->n_items, NULL))
|
||||
{
|
||||
char *name;
|
||||
|
||||
@ -468,7 +468,7 @@ utf8_list_from_results (GetPropertyResults *results,
|
||||
|
||||
retval = g_new0 (char*, n_strings + 1);
|
||||
|
||||
p = results->prop;
|
||||
p = (char *)results->prop;
|
||||
i = 0;
|
||||
while (i < n_strings)
|
||||
{
|
||||
@ -784,12 +784,12 @@ class_hint_from_results (GetPropertyResults *results,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
strcpy (class_hint->res_name, results->prop);
|
||||
strcpy (class_hint->res_name, (char *)results->prop);
|
||||
|
||||
if (len_name == (int) results->n_items)
|
||||
len_name--;
|
||||
|
||||
len_class = strlen (results->prop + len_name + 1);
|
||||
len_class = strlen ((char *)results->prop + len_name + 1);
|
||||
|
||||
if (! (class_hint->res_class = ag_Xmalloc(len_class+1)))
|
||||
{
|
||||
@ -800,7 +800,7 @@ class_hint_from_results (GetPropertyResults *results,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
strcpy (class_hint->res_class, results->prop + len_name + 1);
|
||||
strcpy (class_hint->res_class, (char *)results->prop + len_name + 1);
|
||||
|
||||
XFree (results->prop);
|
||||
results->prop = NULL;
|
||||
@ -1050,7 +1050,7 @@ meta_prop_get_values (MetaDisplay *display,
|
||||
&results.type, &results.format,
|
||||
&results.n_items,
|
||||
&results.bytes_after,
|
||||
(guchar **)&results.prop) != Success ||
|
||||
(gchar **)&results.prop) != Success ||
|
||||
results.type == None)
|
||||
{
|
||||
values[i].type = META_PROP_VALUE_INVALID;
|
||||
|
Loading…
Reference in New Issue
Block a user