-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focus current tab #638
base: master
Are you sure you want to change the base?
Focus current tab #638
Conversation
Is it necessary to add another dependency (especially X11 specific)? Is using "get_server_time" essential? |
@jeremypw Unfortunately it seems |
var ts = Gdk.X11.get_server_time ((Gdk.X11.Window) window.get_window ()); | ||
window.present_with_time (ts); |
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.
should be using Gtk.get_current_event_time ()
var ts = Gdk.X11.get_server_time ((Gdk.X11.Window) window.get_window ()); | |
window.present_with_time (ts); | |
window.present_with_time (Gtk.get_current_event_time ()); |
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.
@Marukesu Does this work on your end? It doesn't for me. From what I've read, the timestamp that present_with_time
receives must be a X11 server timestamp and the only way I was able to get it was using this Gdk.X11 call. I've tried Gdk.CURRENT_TIME
and many types of datetime functions returning the current time as well.
I'm not a fan of adding this dependency too, but it was literally the only timestamp that worked for me.
} | ||
} | ||
} | ||
get_last_window ().present_with_time ((uint32) now.to_unix ()); |
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.
get_last_window ().present_with_time ((uint32) now.to_unix ()); | |
get_last_window ().present_with_time (Gtk.get_current_event_time ()); |
Might be worth delaying trying to fix this until elementary/notifications#153 is fixed. It should not be necessary to add that extra dependency. |
Fix #73
Tested this with multiple terminal windows and tabs. should work without issues.