Remove workaround for gtk_window_present_with_time() under Wayland
See GNOME/gtk#624
This commit is contained in:
parent
9e44188240
commit
e5775bb674
4 changed files with 15 additions and 29 deletions
|
|
@ -43,7 +43,7 @@ add_project_arguments([
|
|||
#
|
||||
|
||||
target_glib = '2.54' # Also passed to valac, so don't include a point rev
|
||||
target_gtk = '3.22.26'
|
||||
target_gtk = '3.24.7'
|
||||
target_webkit = '2.20'
|
||||
|
||||
# Primary deps
|
||||
|
|
|
|||
|
|
@ -426,23 +426,6 @@ public class GearyApplication : Gtk.Application {
|
|||
}
|
||||
}
|
||||
|
||||
public bool present() {
|
||||
if (controller == null || controller.main_window == null)
|
||||
return false;
|
||||
|
||||
// Use present_with_time and a synthesised time so the present
|
||||
// actually works, as a work around for Bug 766284
|
||||
// <https://bugzilla.gnome.org/show_bug.cgi?id=766284>.
|
||||
// Subtract 1000ms from the current time to avoid the main
|
||||
// window stealing the focus when presented just before
|
||||
// showing a dialog (issue #43, bgo 726282).
|
||||
this.controller.main_window.present_with_time(
|
||||
(uint32) (get_monotonic_time() / 1000) - 1000
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private async void create_async() {
|
||||
// Manually keep the main loop around for the duration of this call.
|
||||
// Without this, the main loop will exit as soon as we hit the yield
|
||||
|
|
@ -728,7 +711,17 @@ public class GearyApplication : Gtk.Application {
|
|||
return -1;
|
||||
}
|
||||
|
||||
/** Removes and re-adds the austostart file if needed. */
|
||||
private bool present() {
|
||||
bool ret = false;
|
||||
if (this.controller != null &&
|
||||
this.controller.main_window != null) {
|
||||
this.controller.main_window.present();
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** Removes and re-adds the autostart file if needed. */
|
||||
private async void update_autostart_file() {
|
||||
try {
|
||||
this.autostart.delete_startup_file();
|
||||
|
|
|
|||
|
|
@ -805,7 +805,6 @@ public class GearyController : Geary.BaseObject {
|
|||
context.authentication_prompting = false;
|
||||
} else {
|
||||
context.authentication_prompting = true;
|
||||
this.application.present();
|
||||
PasswordDialog password_dialog = new PasswordDialog(
|
||||
this.application.get_active_window(),
|
||||
account,
|
||||
|
|
@ -1289,7 +1288,7 @@ public class GearyController : Geary.BaseObject {
|
|||
}
|
||||
|
||||
private void on_indicator_activated_application(uint32 timestamp) {
|
||||
this.application.present();
|
||||
this.main_window.present();
|
||||
}
|
||||
|
||||
private void on_indicator_activated_composer(uint32 timestamp) {
|
||||
|
|
@ -2245,8 +2244,8 @@ public class GearyController : Geary.BaseObject {
|
|||
|
||||
// Find out what to do with the inline composers.
|
||||
// TODO: Remove this in favor of automatically saving drafts
|
||||
this.application.present();
|
||||
Gee.List<ComposerWidget> composers_to_destroy = new Gee.ArrayList<ComposerWidget>();
|
||||
this.main_window.present();
|
||||
foreach (ComposerWidget cw in composer_widgets) {
|
||||
if (cw.state != ComposerWidget.ComposerState.DETACHED)
|
||||
composers_to_destroy.add(cw);
|
||||
|
|
@ -2427,7 +2426,6 @@ public class GearyController : Geary.BaseObject {
|
|||
}
|
||||
|
||||
private bool confirm_delete(int num_messages) {
|
||||
this.application.present();
|
||||
ConfirmationDialog dialog = new ConfirmationDialog(main_window, ngettext(
|
||||
"Do you want to permanently delete this message?",
|
||||
"Do you want to permanently delete these messages?", num_messages),
|
||||
|
|
|
|||
|
|
@ -19,12 +19,7 @@ public interface ComposerContainer {
|
|||
public abstract Gtk.ApplicationWindow top_window { get; }
|
||||
|
||||
public virtual void present() {
|
||||
// Use present_with_time and a synthesised time so the present
|
||||
// actually works, as a work around for Bug 766284
|
||||
// <https://bugzilla.gnome.org/show_bug.cgi?id=766284>.
|
||||
this.top_window.present_with_time(
|
||||
(uint32) (get_monotonic_time() / 1000)
|
||||
);
|
||||
this.top_window.present();
|
||||
}
|
||||
|
||||
public virtual unowned Gtk.Widget get_focus() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue