From 7e105b49c4366fad9cb257c495696d2ba8770b13 Mon Sep 17 00:00:00 2001
From: Rein Klazes <rklazes@xs4all.nl>
Date: Thu, 31 Jan 2002 23:34:18 +0000
Subject: [PATCH] Allow integer atoms in set_property and remove_property.
 Needed by FindText common dialog.

---
 server/atom.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/server/atom.c b/server/atom.c
index debe1867ac1..005c84c8f08 100644
--- a/server/atom.c
+++ b/server/atom.c
@@ -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 */
 int grab_global_atom( atom_t atom )
 {
-    struct atom_entry *entry = get_atom_entry( global_table, atom );
-    if (entry) entry->count++;
-    return (entry != NULL);
+    if (atom >= MIN_STR_ATOM)
+    {
+        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 */
 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 */
-- 
GitLab