search for the window role "gimp-toolbox", since the app sets that instead
2003-11-17 Manish Singh <yosh@gimp.org> * tools/gimp-remote.c (gimp_remote_find_window): search for the window role "gimp-toolbox", since the app sets that instead of the class now.
This commit is contained in:

committed by
Manish Singh

parent
133949f990
commit
05ece027fa
@ -1,3 +1,9 @@
|
|||||||
|
2003-11-17 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* tools/gimp-remote.c (gimp_remote_find_window): search for the
|
||||||
|
window role "gimp-toolbox", since the app sets that instead of
|
||||||
|
the class now.
|
||||||
|
|
||||||
2003-11-17 Sven Neumann <sven@gimp.org>
|
2003-11-17 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/config/gimprc.c (gimp_rc_new): simplified.
|
* app/config/gimprc.c (gimp_rc_new): simplified.
|
||||||
|
@ -65,7 +65,7 @@ gimp_remote_find_window (GdkDisplay *display,
|
|||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
Window root, parent;
|
Window root, parent;
|
||||||
Window *children;
|
Window *children;
|
||||||
Atom class_atom;
|
Atom role_atom;
|
||||||
Atom string_atom;
|
Atom string_atom;
|
||||||
guint nchildren;
|
guint nchildren;
|
||||||
gint i;
|
gint i;
|
||||||
@ -81,7 +81,7 @@ gimp_remote_find_window (GdkDisplay *display,
|
|||||||
if (! (children && nchildren))
|
if (! (children && nchildren))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
class_atom = XInternAtom (xdisplay, "WM_CLASS", TRUE);
|
role_atom = XInternAtom (xdisplay, "WM_WINDOW_ROLE", TRUE);
|
||||||
string_atom = XInternAtom (xdisplay, "STRING", TRUE);
|
string_atom = XInternAtom (xdisplay, "STRING", TRUE);
|
||||||
|
|
||||||
for (i = nchildren - 1; i >= 0; i--)
|
for (i = nchildren - 1; i >= 0; i--)
|
||||||
@ -101,14 +101,14 @@ gimp_remote_find_window (GdkDisplay *display,
|
|||||||
|
|
||||||
window = XmuClientWindow (xdisplay, children[i]);
|
window = XmuClientWindow (xdisplay, children[i]);
|
||||||
|
|
||||||
/* We are searching the Gimp toolbox: Its WM_CLASS Property
|
/* We are searching for the Gimp toolbox: Its WM_WINDOW_ROLE Property
|
||||||
* has the values "toolbox\0Gimp\0". This is pretty relieable,
|
* (as set by gtk_window_set_role ()) has the value "gimp-toolbox".
|
||||||
* it is more reliable when we ask a special property, explicitely
|
* This is pretty reliable, since ask for a special property,
|
||||||
* set from the gimp. See below... :-)
|
* explicitly set by the gimp. See below... :-)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (XGetWindowProperty (xdisplay, window,
|
if (XGetWindowProperty (xdisplay, window,
|
||||||
class_atom,
|
role_atom,
|
||||||
0, 32,
|
0, 32,
|
||||||
FALSE,
|
FALSE,
|
||||||
string_atom,
|
string_atom,
|
||||||
@ -116,9 +116,7 @@ gimp_remote_find_window (GdkDisplay *display,
|
|||||||
&data) == Success &&
|
&data) == Success &&
|
||||||
ret_type)
|
ret_type)
|
||||||
{
|
{
|
||||||
if (nitems > 12 &&
|
if (nitems > 11 && strcmp (data, "gimp-toolbox") == 0)
|
||||||
strcmp (data, "toolbox") == 0 &&
|
|
||||||
strcmp (data + 8, "Gimp") == 0)
|
|
||||||
{
|
{
|
||||||
XFree (data);
|
XFree (data);
|
||||||
result = gdk_window_foreign_new_for_display (display, window);
|
result = gdk_window_foreign_new_for_display (display, window);
|
||||||
|
Reference in New Issue
Block a user