Open r2evans opened 11 months ago
Will look into it, however currently height and width is obtained from meta_window
object of the window, which may or may not exist and may or may not have get_height
and get_width
function. So in order to obtain height of windows without those properties i would have to figure out alternative way of calculating height and width.
Currently, when any property is unobtainable it is not included in JSON result of details
call rather than including key and setting the value to null, that's why there is no height or width property.
I appreciate your response, thanks!
I'm a bit confused though that it (either meta_window
or its dimension accessors) exists for none of the windows I tested (emacs, firefox, gnome-terminal, thunderbird). Is that unexpected?
To be completely honest I quit using Gnome some time ago, so this project is not in such an active development as it used to be. There might have been some changes in API I am not aware of, will need to check soon.
I'm trying to adapt some scripts for Wayland use, namely the ability to copy the width/height of one window onto another. I really think this extension is the most flexible way to do what I want to do. However, I'm not seeing the dimensions.
I first identify the window, namely by finding the focused window:
(This is demoed with that window, but it's the same with other windows too, and it reports the same on both of a dual-monitor setup.)
Namely, I automate getting the id by changing the
jq
expression tojq '.[] | select(.focus) | .id'
and I get the integer id.From there, I look at the
.Details
:I'm expecting to see (among others)
"width"
,"height"
,"x"
, and"y"
.Ubuntu 23.04, gnome 44, libglib2.0-bin 2.76.1-1, window-calls 14.
Thanks!