Allow integer atoms in set_property and remove_property. Needed by

FindText common dialog.
This commit is contained in:
Rein Klazes 2002-01-31 23:34:18 +00:00 committed by Alexandre Julliard
parent cd3afa895b
commit 7e105b49c4

View file

@ -274,15 +274,19 @@ static atom_t find_atom( struct atom_table *table, const WCHAR *str )
/* increment the ref count of a global atom; used for window properties */ /* increment the ref count of a global atom; used for window properties */
int grab_global_atom( atom_t atom ) int grab_global_atom( atom_t atom )
{ {
struct atom_entry *entry = get_atom_entry( global_table, atom ); if (atom >= MIN_STR_ATOM)
if (entry) entry->count++; {
return (entry != NULL); struct atom_entry *entry = get_atom_entry( global_table, atom );
if (entry) entry->count++;
return (entry != NULL);
}
else return 1;
} }
/* decrement the ref count of a global atom; used for window properties */ /* decrement the ref count of a global atom; used for window properties */
void release_global_atom( atom_t atom ) void release_global_atom( atom_t atom )
{ {
delete_atom( global_table, atom ); if (atom >= MIN_STR_ATOM) delete_atom( global_table, atom );
} }
/* add a global atom */ /* add a global atom */