[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] safely-close-window silently ignores unsaved buffers
From: |
Norbert Nemec |
Subject: |
Re: [Texmacs-dev] safely-close-window silently ignores unsaved buffers |
Date: |
Fri, 08 Dec 2006 16:03:32 +0100 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20061115) |
I just located the problem:
in src/Window/X/x_drawable.cpp, routine x_drawable_rep::image
a dummy window is created to be used by ghostscript.
This window is also counted by nr_windows, confusing the check in
safely-kill-window.
This problem should be fairly trivial to fix by adding
nr_windows--;
right after creating this dummy window. The value of nr_windows seems to
be only used to check whether any real windows are still open, so the
dummy should actually never be counted.
Greetings,
Norbert
Norbert Nemec schrieb:
> After repeated loss of data due to bugs in TeXmacs, I have taken the
> time to investigate.
>
> One result of this was patch #5519, which I hope will be incorporated
> soon to avoid further data loss.
>
> Another result is the following half-solved issue:
>
> If some open buffer contains images (either linked or inserted), the
> variable 'nr_windows', declared in src/Window/X/x_loop.cpp and modified
> by the constructors and the destructor of 'x_window_rep' (in fiel
> src/Window/X/x_window.cpp) is 1 larger than it should be.
>
> The result: if only one TeXmacs window is open, (get-nr-windows) returns
> 2 and the function safely-kill-window (in
> TeXmacs/procs/texmacs/texmacs/tm-server.scm) does not check for unsaved
> buffers.
>
> In other words: If the last texmacs window is closed using the X button
> of the window manager (or Alt-F4 - my usual method of closing windows)
> unsaved buffers are silently closed without saving.
>
> Could others please confirm the problem:
> * create file
> * insert image
> * do *not* save file
> * a) File|Close TeXmacs should correctly ask for confirmation
> b) View|Close Window should erraneously quit without asking for
> confirmation (alternatively click the X button in the frame or press
> Alt-F4, depending on the Window manager)
>
> I cannot make out where the problem originates. Hopefully, the
> information given will help someone else to finally solve the problem
> that has enerved for a long time now.
>
> Greetings,
> Norbert
>
>
> _______________________________________________
> Texmacs-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/texmacs-dev
>
>
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Texmacs-dev] safely-close-window silently ignores unsaved buffers,
Norbert Nemec <=