X11 -- how do you prevent window from closing if user closes it

Andreas Mohr andi at rhlx01.fht-esslingen.de
Fri Jun 24 01:06:51 CDT 2005


Hi,

On Thu, Jun 23, 2005 at 09:36:50PM -0400, Peter Quiring wrote:
> I trying to use X11 and let's say I create a text editor.  Let's say the 
> user is using the text editor, makes some changes and then clicks on the 
> [X] to close the window before saving changes.    I want to popup a "are 
> you sure" before the window is closed but X11 doesn't allow this.  How 
> does Wine go about this problem?  In Windows this is easy, in the 
> WindowProc() just ignore WM_CLOSE.
Sorry, I don't have too much experience in that area.
Tried Google Groups and/or X11 specs?

> FYI :Porting some code over to Linux and need a little help.
Wait, does all that mean you're using plain Xlib to port things over?
I'd say you're much better off using things such as GTK or wxWidgets (GTK backend)
or Qt.
Using plain X calls for a port seems rather crazy these days, if it hasn't been all
the time already (I'd wager it's the latter).

Andreas Mohr



More information about the wine-devel mailing list