Difference between revisions of "UnsinkableDialogs"

From Inkscape Wiki
Jump to navigation Jump to search
Line 7: Line 7:
:Also, when new windows are created too fast (press and hold ctrl-n for a couple seconds), this often results in "jitter" where windows fight for focus and frantically redisplay. I'll see if some new checks can heal this.
:Also, when new windows are created too fast (press and hold ctrl-n for a couple seconds), this often results in "jitter" where windows fight for focus and frantically redisplay. I'll see if some new checks can heal this.


:'''UPDATE:''' Here's what I found so far. If I add a gtk_window_present(desktop_window) (i.e. bring  on top the document window that initiated the transientize) in the transientize callback, the dialog stays reliably on top, but it gives frantic races when there are too many document windows created too fast. If I remove this call, there are no races, but the dialog not always shows up on top of the document window; usually when you switch to a new document, it buries the dialogs (even though they are re-transientized!) and only if you click on the window bar of the document one more time, the dialogs emerge.  
:'''UPDATE:''' Here's what I found so far. If I add a gtk_window_present(w) at the end of sp_transientize_callback (i.e. bring  on top the document window that initiated the transientize), the dialog stays reliably on top, but it gives frantic races when there are too many document windows created too fast. If I remove this call, there are no races, but the dialog not always shows up on top of the document window; usually when you switch to a new document, it buries the dialogs (even though they are re-transientized!) and only if you click on the window bar of the document one more time, the dialogs emerge.  


: So both options have their problems. I continue to thinks about it. Please test and share your insights!
: So both options have their problems. I continue to thinks about it. Please test and share your insights!


* The first (and only the first) desktop created by the program sends out the signal before a window for it is created, and the transientizing therefore fails. I added an ugly hack, inkscape_reactivate_desktop in inscape.c, which is called by sp_create_window in interface.c when it's done creating the window. This works but perhaps there's a better way. Ideas welcome.
* The first (and only the first) desktop created by the program sends out the signal before a window for it is created, and the transientizing therefore fails. I added an ugly hack, inkscape_reactivate_desktop in inscape.c, which is called by sp_create_window in interface.c when it's done creating the window. This works but perhaps there's a better way. Ideas welcome.

Revision as of 02:46, 14 November 2003

I just committed an update that makes the toolbar and the object-properties dialog (ctrl-shift-f) unsinkable. This means they re-transientize themselves whenever a new desktop window becomes active. That is, no matter how you switch between document windows, these dialogs remain on top. If you minimize the last (or the only) document window, however, the dialogs minimize too.

Implementation is very simple: the dialogs respond to the activate_desktop signal by attaching themselves to the window of the desktop that sent that signal. There are two problems where I may use someone's help, before I make all other dialogs similarly unsinkable:

  • It's not 100% reliable. Sometimes dialogs fail to re-tranzientize. Looks like this happens when the signal is not sent for some unknown reason. Please test and report your observations or ideas.
Also, when new windows are created too fast (press and hold ctrl-n for a couple seconds), this often results in "jitter" where windows fight for focus and frantically redisplay. I'll see if some new checks can heal this.
UPDATE: Here's what I found so far. If I add a gtk_window_present(w) at the end of sp_transientize_callback (i.e. bring on top the document window that initiated the transientize), the dialog stays reliably on top, but it gives frantic races when there are too many document windows created too fast. If I remove this call, there are no races, but the dialog not always shows up on top of the document window; usually when you switch to a new document, it buries the dialogs (even though they are re-transientized!) and only if you click on the window bar of the document one more time, the dialogs emerge.
So both options have their problems. I continue to thinks about it. Please test and share your insights!
  • The first (and only the first) desktop created by the program sends out the signal before a window for it is created, and the transientizing therefore fails. I added an ugly hack, inkscape_reactivate_desktop in inscape.c, which is called by sp_create_window in interface.c when it's done creating the window. This works but perhaps there's a better way. Ideas welcome.