summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkdisplay-x11.c4
-rw-r--r--gdk/x11/gdkdnd-x11.c2
-rw-r--r--gdk/x11/gdkproperty-x11.c7
-rw-r--r--gdk/x11/gdkscreen-x11.c6
-rw-r--r--gdk/x11/gdkselection-x11.c4
-rw-r--r--gdk/x11/gdktextlistconverter-x11.c2
-rw-r--r--gdk/x11/gdkwindow-x11.c56
7 files changed, 40 insertions, 41 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 9f08d6679c..673731c806 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -520,7 +520,7 @@ gdk_check_wm_state_changed (GdkWindow *window)
}
if (!gdk_x11_screen_supports_net_wm_hint (screen,
- gdk_atom_intern_static_string ("_NET_WM_STATE_FOCUSED")))
+ g_intern_static_string ("_NET_WM_STATE_FOCUSED")))
toplevel->have_focused = TRUE;
/* When have_sticky is turned on, we have to check the DESKTOP property
@@ -847,7 +847,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
*/
if (x11_screen &&
!gdk_x11_screen_supports_net_wm_hint (x11_screen,
- gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN")))
+ g_intern_static_string ("_NET_WM_STATE_HIDDEN")))
{
/* If we are shown (not withdrawn) and get an unmap, it means we were
* iconified in the X sense. If we are withdrawn, and get an unmap, it
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 50ac8240b8..5f9387b6fa 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -1013,7 +1013,7 @@ xdnd_initialize_actions (void)
xdnd_actions_initialized = TRUE;
for (i = 0; i < xdnd_n_actions; i++)
- xdnd_actions_table[i].atom = gdk_atom_intern_static_string (xdnd_actions_table[i].name);
+ xdnd_actions_table[i].atom = g_intern_static_string (xdnd_actions_table[i].name);
}
static GdkDragAction
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 2f3d9a4513..646f5e6112 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -126,7 +126,7 @@ _gdk_x11_precache_atoms (GdkDisplay *display,
n_xatoms = 0;
for (i = 0; i < n_atoms; i++)
{
- GdkAtom atom = gdk_atom_intern_static_string (atom_names[i]);
+ GdkAtom atom = g_intern_static_string (atom_names[i]);
if (lookup_cached_xatom (display, atom) == None)
{
atoms[n_xatoms] = atom;
@@ -209,7 +209,7 @@ gdk_x11_xatom_to_atom_for_display (GdkDisplay *display,
}
else
{
- virtual_atom = gdk_atom_intern (name, FALSE);
+ virtual_atom = g_intern_string (name);
XFree (name);
insert_atom_pair (display, virtual_atom, xatom);
@@ -252,8 +252,7 @@ gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display,
const gchar *atom_name)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), None);
- return gdk_x11_atom_to_xatom_for_display (display,
- gdk_atom_intern (atom_name, FALSE));
+ return gdk_x11_atom_to_xatom_for_display (display, g_intern_string (atom_name));
}
Atom
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 6af8a3d05b..c12898f133 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -156,7 +156,7 @@ get_current_desktop (GdkX11Screen *screen)
int workspace = 0;
if (!gdk_x11_screen_supports_net_wm_hint (screen,
- gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP")))
+ g_intern_static_string ("_NET_CURRENT_DESKTOP")))
return workspace;
display = GDK_DISPLAY_XDISPLAY (GDK_SCREEN_DISPLAY (screen));
@@ -208,7 +208,7 @@ gdk_x11_screen_get_work_area (GdkX11Screen *x11_screen,
area->height = HeightOfScreen (x11_screen->xscreen);
if (!gdk_x11_screen_supports_net_wm_hint (x11_screen,
- gdk_atom_intern_static_string ("_NET_WORKAREA")))
+ g_intern_static_string ("_NET_WORKAREA")))
return;
if (workarea == None)
@@ -1248,7 +1248,7 @@ get_netwm_cardinal_property (GdkX11Screen *x11_screen,
gulong bytes_after;
guchar *data;
- atom = gdk_atom_intern_static_string (name);
+ atom = g_intern_static_string (name);
if (!gdk_x11_screen_supports_net_wm_hint (x11_screen, atom))
return 0;
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 1162f7c20c..aa3babc251 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -199,11 +199,11 @@ _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display,
gint length,
gchar ***list)
{
- if (encoding == gdk_atom_intern_static_string ("STRING"))
+ if (encoding == g_intern_static_string ("STRING"))
{
return make_list ((gchar *)text, length, TRUE, list);
}
- else if (encoding == gdk_atom_intern_static_string ("UTF8_STRING"))
+ else if (encoding == g_intern_static_string ("UTF8_STRING"))
{
return make_list ((gchar *)text, length, FALSE, list);
}
diff --git a/gdk/x11/gdktextlistconverter-x11.c b/gdk/x11/gdktextlistconverter-x11.c
index e3c7296b31..38c7df9a71 100644
--- a/gdk/x11/gdktextlistconverter-x11.c
+++ b/gdk/x11/gdktextlistconverter-x11.c
@@ -174,7 +174,7 @@ gdk_x11_text_list_converter_encode (GdkX11TextListConverter *conv,
if (gdk_x11_display_utf8_to_compound_text (conv->display, tmp,
&encoding, &format, &text, &new_length))
{
- if (encoding == gdk_atom_intern (conv->encoding, FALSE) &&
+ if (encoding == g_intern_string (conv->encoding) &&
format == conv->format)
{
result = write_output (outbuf, outbuf_size, bytes_written, text, new_length, error);
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 9fae7dc4a9..baa26cccbd 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -213,7 +213,7 @@ static gboolean
gdk_x11_window_supports_edge_constraints (GdkWindow *window)
{
return gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_GTK_EDGE_CONSTRAINTS"));
+ g_intern_static_string ("_GTK_EDGE_CONSTRAINTS"));
}
static void
@@ -437,7 +437,7 @@ gdk_x11_window_end_frame (GdkWindow *window)
if (impl->frame_sync_enabled &&
gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_NET_WM_FRAME_DRAWN")))
+ g_intern_static_string ("_NET_WM_FRAME_DRAWN")))
{
impl->toplevel->frame_pending = TRUE;
_gdk_frame_clock_freeze (gdk_window_get_frame_clock (window));
@@ -1721,7 +1721,7 @@ get_netwm_cardinal_property (GdkWindow *window,
gulong bytes_after;
guchar *data;
- atom = gdk_atom_intern_static_string (name);
+ atom = g_intern_static_string (name);
if (!gdk_x11_screen_supports_net_wm_hint (x11_screen, atom))
return 0;
@@ -1779,7 +1779,7 @@ gdk_x11_window_move_to_desktop (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window));
- atom = gdk_atom_intern_static_string ("_NET_WM_DESKTOP");
+ atom = g_intern_static_string ("_NET_WM_DESKTOP");
if (!gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window), atom))
return;
@@ -1819,7 +1819,7 @@ gdk_x11_window_focus (GdkWindow *window,
display = GDK_WINDOW_DISPLAY (window);
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_NET_ACTIVE_WINDOW")))
+ g_intern_static_string ("_NET_ACTIVE_WINDOW")))
{
XClientMessageEvent xclient;
@@ -2031,7 +2031,7 @@ gdk_x11_window_set_modal_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (modal, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_MODAL"),
+ g_intern_static_string ("_NET_WM_STATE_MODAL"),
NULL);
}
@@ -2052,7 +2052,7 @@ gdk_x11_window_set_skip_taskbar_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (skips_taskbar, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_SKIP_TASKBAR"),
+ g_intern_static_string ("_NET_WM_STATE_SKIP_TASKBAR"),
NULL);
}
@@ -2073,7 +2073,7 @@ gdk_x11_window_set_skip_pager_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (skips_pager, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_SKIP_PAGER"),
+ g_intern_static_string ("_NET_WM_STATE_SKIP_PAGER"),
NULL);
}
@@ -2590,7 +2590,7 @@ gdk_x11_window_get_frame_extents (GdkWindow *window,
/* first try: use _NET_FRAME_EXTENTS */
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_NET_FRAME_EXTENTS")) &&
+ g_intern_static_string ("_NET_FRAME_EXTENTS")) &&
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), xwindow,
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_FRAME_EXTENTS"),
@@ -2639,7 +2639,7 @@ gdk_x11_window_get_frame_extents (GdkWindow *window,
root = GDK_WINDOW_XROOTWIN (window);
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_NET_VIRTUAL_ROOTS")) &&
+ g_intern_static_string ("_NET_VIRTUAL_ROOTS")) &&
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), root,
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_VIRTUAL_ROOTS"),
@@ -2919,7 +2919,7 @@ gdk_x11_window_set_user_time (GdkWindow *window,
if (toplevel->focus_window != None &&
gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_NET_WM_USER_TIME_WINDOW")))
+ g_intern_static_string ("_NET_WM_USER_TIME_WINDOW")))
xid = toplevel->focus_window;
else
xid = GDK_WINDOW_XID (window);
@@ -3309,7 +3309,7 @@ gdk_x11_window_iconify (GdkWindow *window)
0,
GDK_WINDOW_STATE_ICONIFIED);
gdk_wmspec_change_state (TRUE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN"),
+ g_intern_static_string ("_NET_WM_STATE_HIDDEN"),
NULL);
}
}
@@ -3325,7 +3325,7 @@ gdk_x11_window_deiconify (GdkWindow *window)
{
gdk_window_show (window);
gdk_wmspec_change_state (FALSE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN"),
+ g_intern_static_string ("_NET_WM_STATE_HIDDEN"),
NULL);
}
else
@@ -3335,7 +3335,7 @@ gdk_x11_window_deiconify (GdkWindow *window)
GDK_WINDOW_STATE_ICONIFIED,
0);
gdk_wmspec_change_state (FALSE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN"),
+ g_intern_static_string ("_NET_WM_STATE_HIDDEN"),
NULL);
}
}
@@ -3357,7 +3357,7 @@ gdk_x11_window_stick (GdkWindow *window)
/* Request stick during viewport scroll */
gdk_wmspec_change_state (TRUE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_STICKY"),
+ g_intern_static_string ("_NET_WM_STATE_STICKY"),
NULL);
/* Request desktop 0xFFFFFFFF */
@@ -3399,7 +3399,7 @@ gdk_x11_window_unstick (GdkWindow *window)
{
/* Request unstick from viewport */
gdk_wmspec_change_state (FALSE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_STICKY"),
+ g_intern_static_string ("_NET_WM_STATE_STICKY"),
NULL);
move_to_current_desktop (window);
@@ -3423,8 +3423,8 @@ gdk_x11_window_maximize (GdkWindow *window)
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (TRUE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_MAXIMIZED_VERT"),
- gdk_atom_intern_static_string ("_NET_WM_STATE_MAXIMIZED_HORZ"));
+ g_intern_static_string ("_NET_WM_STATE_MAXIMIZED_VERT"),
+ g_intern_static_string ("_NET_WM_STATE_MAXIMIZED_HORZ"));
else
gdk_synthesize_window_state (window,
0,
@@ -3440,8 +3440,8 @@ gdk_x11_window_unmaximize (GdkWindow *window)
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (FALSE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_MAXIMIZED_VERT"),
- gdk_atom_intern_static_string ("_NET_WM_STATE_MAXIMIZED_HORZ"));
+ g_intern_static_string ("_NET_WM_STATE_MAXIMIZED_VERT"),
+ g_intern_static_string ("_NET_WM_STATE_MAXIMIZED_HORZ"));
else
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_MAXIMIZED,
@@ -3550,7 +3550,7 @@ gdk_x11_window_fullscreen (GdkWindow *window)
if (GDK_WINDOW_IS_MAPPED (window))
{
gdk_wmspec_change_state (TRUE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_FULLSCREEN"),
+ g_intern_static_string ("_NET_WM_STATE_FULLSCREEN"),
NULL);
/* Actual XRandR layout may have change since we computed the fullscreen
* monitors in GDK_FULLSCREEN_ON_ALL_MONITORS mode.
@@ -3590,7 +3590,7 @@ gdk_x11_window_unfullscreen (GdkWindow *window)
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (FALSE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_FULLSCREEN"),
+ g_intern_static_string ("_NET_WM_STATE_FULLSCREEN"),
NULL);
else
@@ -3613,10 +3613,10 @@ gdk_x11_window_set_keep_above (GdkWindow *window,
{
if (setting)
gdk_wmspec_change_state (FALSE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_BELOW"),
+ g_intern_static_string ("_NET_WM_STATE_BELOW"),
NULL);
gdk_wmspec_change_state (setting, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_ABOVE"),
+ g_intern_static_string ("_NET_WM_STATE_ABOVE"),
NULL);
}
else
@@ -3638,10 +3638,10 @@ gdk_x11_window_set_keep_below (GdkWindow *window, gboolean setting)
{
if (setting)
gdk_wmspec_change_state (FALSE, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_ABOVE"),
+ g_intern_static_string ("_NET_WM_STATE_ABOVE"),
NULL);
gdk_wmspec_change_state (setting, window,
- gdk_atom_intern_static_string ("_NET_WM_STATE_BELOW"),
+ g_intern_static_string ("_NET_WM_STATE_BELOW"),
NULL);
}
else
@@ -4590,7 +4590,7 @@ _should_perform_ewmh_drag (GdkWindow *window,
if ((!info->last_slave || gdk_device_get_source (info->last_slave) != GDK_SOURCE_TOUCHSCREEN) &&
gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_NET_WM_MOVERESIZE")))
+ g_intern_static_string ("_NET_WM_MOVERESIZE")))
return TRUE;
return FALSE;
@@ -4881,7 +4881,7 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
}
if (!gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
- gdk_atom_intern_static_string ("_GTK_SHOW_WINDOW_MENU")))
+ g_intern_static_string ("_GTK_SHOW_WINDOW_MENU")))
return FALSE;
gdk_event_get_root_coords (event, &x_root, &y_root);