-
Notifications
You must be signed in to change notification settings - Fork 606
Quit Fix #458
Quit Fix #458
Conversation
@nathanial You'll need to agree to the Brackets CLA. |
@nathanial Here are the key shutdown scenarios:
|
@redmunds Aha, cool. I will test these scenarios. Also, I agreed to the CLA. |
@redmunds Ok, I ran through all the cases and they all appear to work. For scenario 4, the only oddness is that closing the original window closes all the windows. |
Actually, that is the expected behavior. Just need to find someone with Linux Dev environment setup to review this PR. |
// else | ||
browser->GetHost()->CloseBrowser(true); | ||
browser->GetHost()->CloseBrowser(true); | ||
GtkWidget* hwnd = gtk_widget_get_toplevel (browser->GetHost()->GetWindowHandle() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not a good idea to call browser->GetHost() after calling browser->GetHost()->CloseBrowser(). This may crash in future versions since theoretically it should delete the "browser" pointer on close.
@JeffryBooher I adjusted the code and re-tested it. Appears to work. |
@ingorichter Said he could re-review this soon, so assigning him |
@nathanial I've tested this on Ubuntu 14.04 TLS 32Bit and it creates a core dump when I exit Brackets. I'm starting Brackets from the command line and that's the reason I was seeing the message about the core dump. Starting from whatever file manager doesn't give any indication about a core dump. Otherwise it seems that Brackets will exit after one click on the close button. Which is an improvement already. |
@nathanial what have you done to compile brackets-shell on Arch Linux? I'm getting a |
@ingorichter I've just been doing |
@ingorichter I'll also investigate the core dump. |
@ingorichter According to ldconfig I have these versions of gcrypt on my machine.
I don't seem to get any errors when I run |
@nathanial I was able to remove a install a version of libgcrypt and compile Brackets. But there is still something wrong, since it's not starting properly. :-( |
// else | ||
browser->GetHost()->CloseBrowser(true); | ||
GtkWidget* widget = gtk_widget_get_toplevel (browser->GetHost()->GetWindowHandle()); | ||
browser->GetHost()->CloseBrowser(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need the code on line 532. Isn't this the hack, which was supposed to be removed once CEF was fixed?
I un-commented the code and removed that line (and the else, too, since it seems to not be needed anymore) and Brackets now behaves as expected (i.e. given that no file was modified, Brackets exited after just one click of the close button).
I also edited a file and clicked close, then Brackets asked me to save (or discard the changes) - clicking "Cancel" kept Brackets from closing, clicking "Save" saved the changes, and clicking "Don't Save" discarded the changes.
Brackets exited clean during all of the above scenarios (or didn't exit, after clicking "Cancel").
Is there something I'm missing, so we actually need line 532 for some reason?
P.S.: I forgot to mention - I'm using Ubuntu 14.04.1 x64 (LTS) with latest updates.
@ingorichter , do you think you can test this without line 532? Edit: I assumed this was because of this fix, but then I ran the latest stable release of Brackets from command line just for sanity check and it turns out the same messages are dumped even when using just "browser->GetHost()->CloseBrowser(true);" in the CloseWindow() function (i.e. without this fix). |
Could someone point me to the right information? Edit: |
@radorodopski let me have a look later this week. We are currently working on 1.0 release and time is very limited. |
Hi @ingorichter, What worked for me was just uncommenting the following lines in appshell_extensions_gtk.cpp: GtkWidget* hwnd = gtk_widget_get_toplevel (browser->GetHost()->GetWindowHandle() );
if(gtk_widget_is_toplevel (hwnd))
gtk_signal_emit_by_name(GTK_OBJECT(hwnd), "delete_event");
else
browser->GetHost()->CloseBrowser(true); Let me know if this also works for you. |
@ingorichter Do you still have cycles to review this more, or should we unassign? |
Let me check this, since I ran into the issues with my VM right away last time. This shouldn't take that much time. |
@nathanial @ingorichter I tried merging this with our current work with CEF 2171. Seems to work great for me on my Ubuntu 14.04 64-bit VM, see #503. |
@abose Can you have a look at this? |
Any news about merging this PR? Using 1.7 on Arch (from AUR) right now, and the issue still exists. |
@aaulia are you able to test it and verify if it does work? Otherwise I suggest to you to use brackets-electron. |
Uncommenting the GTK delete_event code appears to fix adobe/brackets#4611
I tested on Arch Linux 64-bit, using the latest brackets-shell and brackets versions.