mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
put in attempted fix for the GTK 1.2 plug/socket screwup, now that my
2002-01-06 Havoc Pennington <hp@pobox.com> * src/window.c (meta_window_notify_focus): put in attempted fix for the GTK 1.2 plug/socket screwup, now that my fixed debug spew reveals what's actually happening. ;-) * src/gradient.c (meta_gradient_description_new): object to store gradient descriptions * src/window.c (meta_window_notify_focus): fix the debug spew that was confusing me * src/wm-tester/focus-window.c: add little program to focus a window ID
This commit is contained in:

committed by
Havoc Pennington

parent
ac85e1e225
commit
f36ba88085
@ -7,7 +7,11 @@ wm_tester_SOURCES= \
|
||||
test_gravity_SOURCES= \
|
||||
test-gravity.c
|
||||
|
||||
noinst_PROGRAMS=wm-tester test-gravity
|
||||
focus_window_SOURCES= \
|
||||
focus-window.c
|
||||
|
||||
noinst_PROGRAMS=wm-tester test-gravity focus-window
|
||||
|
||||
wm_tester_LDADD= @METACITY_LIBS@
|
||||
test_gravity_LDADD= @METACITY_LIBS@
|
||||
test_gravity_LDADD= @METACITY_LIBS@
|
||||
focus_window_LDADD= @METACITY_LIBS@
|
37
src/wm-tester/focus-window.c
Normal file
37
src/wm-tester/focus-window.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
Display *d;
|
||||
Window w;
|
||||
const char *w_str;
|
||||
char *end;
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
fprintf (stderr, "Usage: focus-window WINDOWID\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
d = XOpenDisplay (NULL);
|
||||
|
||||
w_str = argv[1];
|
||||
end = NULL;
|
||||
|
||||
w = strtoul (w_str, &end, 16);
|
||||
if (end == w_str)
|
||||
{
|
||||
fprintf (stderr, "Usage: focus-window WINDOWID\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
printf ("Setting input focus to 0x%lx\n", w);
|
||||
XSetInputFocus (d, w, RevertToPointerRoot, CurrentTime);
|
||||
XFlush (d);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user