DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2627
Version: 1.4-feature


Note: Kurt posted a code fragment to fltk.development that can be used for
testing to destroy another X11 Window. I modified it slightly and attached
it with some comments (see XDestroyWindow.c).

I can confirm that I can kill a FLTK window from another session using the
attached program. The FLTK application (in a simple test: test/tabs) will
hang then.

@Kurt: I hope you don't mind that I posted your small program here, since
you did so in fltk.development. This is very helpful for testing. Please
post relevant information to the STR form at
<http://www.fltk.org/str.php?L2627> instead of posting/mailing directly to
fltk.development, so that we don't lose it. Thanks.


Link: http://www.fltk.org/str.php?L2627
Version: 1.4-feature
/* This program can be used to destroy any X11 Window

   compile and link:
     gcc -o XDestroyWindow XDestroyWindow.c -lX11

   Use FLTK's fl_xid(Fl_Window*) to get the X11 Window id,
   or use some X11 tool like xwininfo to get it, and then
   run
     ./XDestroyWindow window-id
   to destroy an existing X11 Window.

   This program has been posted to fltk.development by Kurt van Dijck
   and modified slightly and commented by Albrecht Schlosser.
*/
#include <X11/Xlib.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  Display *dpy;
  dpy = XOpenDisplay(getenv("DISPLAY") ?: ":0");
  XDestroyWindow(dpy, strtoul(argv[1], 0, 0));
  XFlush(dpy);
  return 0;
}
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to