Capturing the window close event in X
I need to capture the event generated when my X app is closed. I can capture all events except when the 'x' is clicked and the window disappears. Whenever I click the 'x' I get a message like this:
X connection to :0.0 broken (explicit kill or server shutdown). How can I capture when the user exits the app so I can do some clean up within my program? Thanks, Patrick P.S. - I don't want to use GTK or Motif to do so either. I just need to capture the close event and do some stuff before exiting the app. |
although not straight X , its Xt
gcc -o 1 1.c -L/usr/X11R6/lib -lXaw -lXmu -lXt -lXext -lX11 Code:
#include <X11/Intrinsic.h> source :: http://www.stllinux.org/meeting_note...619/xprog.html also have a look at xcalc.c , also using Xt |
All times are GMT -5. The time now is 07:20 AM. |