summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/window.rs')
-rw-r--r--alacritty_terminal/src/window.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/alacritty_terminal/src/window.rs b/alacritty_terminal/src/window.rs
index a929a1b7..5c1457e5 100644
--- a/alacritty_terminal/src/window.rs
+++ b/alacritty_terminal/src/window.rs
@@ -12,12 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::convert::From;
+use std::ffi::c_void;
use std::fmt::Display;
use crate::gl;
use glutin::dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize};
+#[cfg(target_os = "macos")]
+use glutin::os::macos::WindowExt;
#[cfg(not(any(target_os = "macos", windows)))]
-use glutin::os::unix::EventsLoopExt;
+use glutin::os::unix::{EventsLoopExt, WindowExt};
#[cfg(not(target_os = "macos"))]
use glutin::Icon;
use glutin::{
@@ -362,13 +365,11 @@ impl Window {
target_os = "openbsd"
))]
pub fn set_urgent(&self, is_urgent: bool) {
- use glutin::os::unix::WindowExt;
self.window().set_urgent(is_urgent);
}
#[cfg(target_os = "macos")]
pub fn set_urgent(&self, is_urgent: bool) {
- use glutin::os::macos::WindowExt;
self.window().request_user_attention(is_urgent);
}
@@ -381,8 +382,6 @@ impl Window {
#[cfg(not(any(target_os = "macos", target_os = "windows")))]
pub fn get_window_id(&self) -> Option<usize> {
- use glutin::os::unix::WindowExt;
-
match self.window().get_xlib_window() {
Some(xlib_window) => Some(xlib_window as usize),
None => None,
@@ -416,6 +415,11 @@ impl Window {
self.window().set_simple_fullscreen(fullscreen);
}
+ #[cfg(not(any(target_os = "macos", target_os = "windows")))]
+ pub fn get_wayland_display(&self) -> Option<*mut c_void> {
+ self.window().get_wayland_display()
+ }
+
fn window(&self) -> &glutin::Window {
self.windowed_context.window()
}
@@ -441,7 +445,6 @@ impl OsExtensions for Window {}
))]
impl OsExtensions for Window {
fn run_os_extensions(&self) {
- use glutin::os::unix::WindowExt;
use libc::getpid;
use std::ffi::CStr;
use std::ptr;