-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gtk4: add support for --show-native-window-id
- Loading branch information
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2004-2019 Sutou Kouhei <[email protected]> | ||
# Copyright (C) 2004-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -853,9 +853,16 @@ def do_display | |
setup_3d_info(canvas) | ||
frame.init_gui(@options.width, @options.height, true) | ||
frame.fullscreen if @options.full_screen | ||
native_window = frame.window.window | ||
if @options.show_native_window_id and native_window.respond_to?(:xid) | ||
@logger.info(_("Window ID: %d") % native_window.xid) | ||
if @options.show_native_window_id | ||
window = frame.window | ||
if window.respond_to?(:surface) | ||
native_surface = window.surface | ||
else | ||
native_surface = window.window | ||
end | ||
if native_surface.respond_to?(:xid) | ||
@logger.info(_("Window ID: %d") % native_surface.xid) | ||
end | ||
end | ||
apply_theme_if_need(frame) | ||
parse(frame, source, !Utils.windows?) | ||
|