gdkevents-x11: look up the atom of a window manager hint once, not once per supported hint
This commit is contained in:
parent
a25586b882
commit
3124dc081b
1 changed files with 5 additions and 5 deletions
|
|
@ -2888,6 +2888,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
|
|||
GdkScreenX11 *screen_x11;
|
||||
NetWmSupportedAtoms *supported_atoms;
|
||||
GdkDisplay *display;
|
||||
Atom atom;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
|
||||
|
||||
|
|
@ -2939,13 +2940,12 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
|
|||
if (supported_atoms->atoms == NULL)
|
||||
return FALSE;
|
||||
|
||||
i = 0;
|
||||
while (i < supported_atoms->n_atoms)
|
||||
{
|
||||
if (supported_atoms->atoms[i] == gdk_x11_atom_to_xatom_for_display (display, property))
|
||||
return TRUE;
|
||||
atom = gdk_x11_atom_to_xatom_for_display (display, property);
|
||||
|
||||
++i;
|
||||
for (i = 0; i < supported_atoms->n_atoms; i++)
|
||||
{
|
||||
if (supported_atoms->atoms[i] == atom)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue