Skip to content

Commit

Permalink
gtk4: add support for --show-native-window-id
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 14, 2024
1 parent fcb12eb commit c24b8fc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/rabbit/command/rabbit.rb
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
Expand Down Expand Up @@ -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?)
Expand Down

0 comments on commit c24b8fc

Please sign in to comment.