fix: add Wayland support (#26022)
This commit is contained in:
parent
d38c47e748
commit
c4525b4ea6
12 changed files with 272 additions and 159 deletions
|
@ -15,9 +15,16 @@
|
|||
#include "shell/browser/unresponsive_suppressor.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
#include "ui/events/platform/x11/x11_event_source.h"
|
||||
#include "ui/gtk/gtk_util.h"
|
||||
|
||||
#if defined(USE_X11)
|
||||
#include "ui/events/platform/x11/x11_event_source.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_OZONE) || defined(USE_X11)
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#endif
|
||||
|
||||
namespace file_dialog {
|
||||
|
||||
DialogSettings::DialogSettings() = default;
|
||||
|
@ -135,11 +142,15 @@ class FileChooserDialog {
|
|||
this);
|
||||
gtk_widget_show_all(dialog_);
|
||||
|
||||
// We need to call gtk_window_present after making the widgets visible to
|
||||
// make sure window gets correctly raised and gets focus.
|
||||
x11::Time time = ui::X11EventSource::GetInstance()->GetTimestamp();
|
||||
gtk_window_present_with_time(GTK_WINDOW(dialog_),
|
||||
static_cast<uint32_t>(time));
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
// We need to call gtk_window_present after making the widgets visible to
|
||||
// make sure window gets correctly raised and gets focus.
|
||||
x11::Time time = ui::X11EventSource::GetInstance()->GetTimestamp();
|
||||
gtk_window_present_with_time(GTK_WINDOW(dialog_),
|
||||
static_cast<uint32_t>(time));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void RunSaveAsynchronous(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue