Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Issue 1045443002: Make File-Picker modal on Linux (Closed)

Created:
5 years, 9 months ago by joone
Modified:
5 years, 5 months ago
CC:
chromium-reviews, kalyank, tdanderson+views_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make File-Picker modal on Linux Chromium for Linux opens a Gtk file-picker for file browsing, but it is not modal because there is no GtkWindow as parent of file-picker. This patch allows the X11 host window to disable input event handling to make a file-picker modal. BUG=408481 Committed: https://crrev.com/b440cbb929e62a238f97590d79bd78333adef7ce Cr-Commit-Position: refs/heads/master@{#338870}

Patch Set 1 #

Patch Set 2 : Applied ScopedWindowTargeter to block events #

Total comments: 3

Patch Set 3 : allow each host window to open a dialog #

Patch Set 4 : rebase on master #

Total comments: 17

Patch Set 5 : Removed modal_dialog_xid_ in X11DesktopHandler and fixed others. #

Total comments: 2

Patch Set 6 : Updated comments and moved input-focus code #

Total comments: 2

Patch Set 7 : Do not call HandleNativeWidgetActivationChanged() #

Total comments: 7

Patch Set 8 : Updated for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -5 lines) Patch
M chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc View 1 2 3 4 4 chunks +13 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h View 1 2 3 4 5 6 7 3 chunks +15 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 3 4 5 6 7 3 chunks +21 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -2 lines 0 comments Download

Messages

Total messages: 37 (9 generated)
joone
erg@ I tried to make a GtkWidget or GtkWindow with XID of the X11 host ...
5 years, 9 months ago (2015-03-27 23:25:46 UTC) #2
sadrul
On 2015/03/27 23:25:46, joone wrote: > erg@ I tried to make a GtkWidget or GtkWindow ...
5 years, 9 months ago (2015-03-27 23:34:46 UTC) #3
joone
On 2015/03/27 23:34:46, sadrul wrote: > On 2015/03/27 23:25:46, joone wrote: > > erg@ I ...
5 years, 8 months ago (2015-03-31 20:36:55 UTC) #4
joone
sadrul@ Could you review the updated patch?
5 years, 8 months ago (2015-04-07 21:41:41 UTC) #6
sadrul
https://codereview.chromium.org/1045443002/diff/20001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc File chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc (right): https://codereview.chromium.org/1045443002/diff/20001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc#newcode278 chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc:278: gtk_widget_get_window(dialog))); This makes it modal for all chrome windows. ...
5 years, 8 months ago (2015-04-21 19:50:01 UTC) #7
joone
https://codereview.chromium.org/1045443002/diff/20001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc File chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc (right): https://codereview.chromium.org/1045443002/diff/20001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc#newcode278 chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc:278: gtk_widget_get_window(dialog))); On 2015/04/21 19:50:01, sadrul wrote: > This makes ...
5 years, 8 months ago (2015-04-22 19:44:33 UTC) #8
joone
sadrul@ please take a look at the updated patch.
5 years, 8 months ago (2015-04-23 00:07:42 UTC) #9
sadrul
https://codereview.chromium.org/1045443002/diff/60001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc File chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc (right): https://codereview.chromium.org/1045443002/diff/60001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc#newcode280 chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc:280: GetAuraTransientParent(dialog)->GetHost()); Looks like GetAuraTransientParent() could return null? (e.g. for ...
5 years, 5 months ago (2015-06-30 17:30:56 UTC) #10
joone
Thanks for the review. Please take a look at the updated CL. https://codereview.chromium.org/1045443002/diff/60001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc File chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc ...
5 years, 5 months ago (2015-07-01 03:16:06 UTC) #11
sadrul
https://codereview.chromium.org/1045443002/diff/60001/ui/views/widget/desktop_aura/x11_desktop_handler.cc File ui/views/widget/desktop_aura/x11_desktop_handler.cc (right): https://codereview.chromium.org/1045443002/diff/60001/ui/views/widget/desktop_aura/x11_desktop_handler.cc#newcode229 ui/views/widget/desktop_aura/x11_desktop_handler.cc:229: modal_dialog_xid_ = new_host->GetModalDialog(); On 2015/07/01 03:16:06, joone wrote: > ...
5 years, 5 months ago (2015-07-01 03:58:14 UTC) #12
joone
Please review the updated CL. Thanks! https://codereview.chromium.org/1045443002/diff/60001/ui/views/widget/desktop_aura/x11_desktop_handler.cc File ui/views/widget/desktop_aura/x11_desktop_handler.cc (right): https://codereview.chromium.org/1045443002/diff/60001/ui/views/widget/desktop_aura/x11_desktop_handler.cc#newcode229 ui/views/widget/desktop_aura/x11_desktop_handler.cc:229: modal_dialog_xid_ = new_host->GetModalDialog(); ...
5 years, 5 months ago (2015-07-01 21:40:37 UTC) #13
sadrul
https://codereview.chromium.org/1045443002/diff/100001/ui/views/widget/desktop_aura/x11_desktop_handler.cc File ui/views/widget/desktop_aura/x11_desktop_handler.cc (right): https://codereview.chromium.org/1045443002/diff/100001/ui/views/widget/desktop_aura/x11_desktop_handler.cc#newcode220 ui/views/widget/desktop_aura/x11_desktop_handler.cc:220: new_host->HandleNativeWidgetActivationChanged(true); We don't actually want to call this if ...
5 years, 5 months ago (2015-07-08 15:02:31 UTC) #14
joone
https://codereview.chromium.org/1045443002/diff/100001/ui/views/widget/desktop_aura/x11_desktop_handler.cc File ui/views/widget/desktop_aura/x11_desktop_handler.cc (right): https://codereview.chromium.org/1045443002/diff/100001/ui/views/widget/desktop_aura/x11_desktop_handler.cc#newcode220 ui/views/widget/desktop_aura/x11_desktop_handler.cc:220: new_host->HandleNativeWidgetActivationChanged(true); On 2015/07/08 15:02:31, sadrul wrote: > We don't ...
5 years, 5 months ago (2015-07-08 17:16:46 UTC) #15
joone
https://codereview.chromium.org/1045443002/diff/120001/ui/views/widget/desktop_aura/x11_desktop_handler.cc File ui/views/widget/desktop_aura/x11_desktop_handler.cc (right): https://codereview.chromium.org/1045443002/diff/120001/ui/views/widget/desktop_aura/x11_desktop_handler.cc#newcode238 ui/views/widget/desktop_aura/x11_desktop_handler.cc:238: We don't call new_host->HandleNativeWidgetActivationChanged(true) when |new_host| has a modal ...
5 years, 5 months ago (2015-07-08 17:54:46 UTC) #16
sadrul
A few nits, other than that, lgtm. Would it be possible to write tests for ...
5 years, 5 months ago (2015-07-14 08:13:02 UTC) #17
joone
Thanks for the review! https://codereview.chromium.org/1045443002/diff/120001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h (right): https://codereview.chromium.org/1045443002/diff/120001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h#newcode91 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h:91: void DisableEventListening(XID dialog); On 2015/07/14 ...
5 years, 5 months ago (2015-07-14 22:35:39 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1045443002/140001
5 years, 5 months ago (2015-07-14 22:36:53 UTC) #21
joone
On 2015/07/14 08:13:02, sadrul wrote: > A few nits, other than that, lgtm. > > ...
5 years, 5 months ago (2015-07-14 22:41:26 UTC) #23
sadrul
On 2015/07/14 22:41:26, joone wrote: > On 2015/07/14 08:13:02, sadrul wrote: > > A few ...
5 years, 5 months ago (2015-07-15 06:10:09 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1045443002/140001
5 years, 5 months ago (2015-07-15 06:37:13 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/78868)
5 years, 5 months ago (2015-07-15 06:43:02 UTC) #28
joone
On 2015/07/15 06:43:02, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 5 months ago (2015-07-15 06:49:12 UTC) #29
joone
erg@, estade@ Could you review this CL?
5 years, 5 months ago (2015-07-15 16:22:06 UTC) #31
Elliot Glaysher
lgtm
5 years, 5 months ago (2015-07-15 16:49:21 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1045443002/140001
5 years, 5 months ago (2015-07-15 16:49:52 UTC) #34
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 5 months ago (2015-07-15 17:02:02 UTC) #35
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/b440cbb929e62a238f97590d79bd78333adef7ce Cr-Commit-Position: refs/heads/master@{#338870}
5 years, 5 months ago (2015-07-15 17:03:08 UTC) #36
juncai
5 years, 5 months ago (2015-07-16 22:01:09 UTC) #37
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/1243503002/ by juncai@chromium.org.

The reason for reverting is: This patch causes DCHECK failure. Refer to:
https://code.google.com/p/chromium/issues/detail?id=510957.

Powered by Google App Engine
This is Rietveld 408576698