[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to get a window Lisp_Object from struct window *w?
From: |
Keith David Bershatsky |
Subject: |
How to get a window Lisp_Object from struct window *w? |
Date: |
Mon, 17 Sep 2018 17:57:45 -0700 |
I am chiseling away at feature requests #17684 (crosshairs) and #22873
(multiple fake cursors).
In this particular example, redisplay gives us the w (struct window *w) as it
goes through each window. I am recording the window Lisp_Object in a cache
(also a Lisp_Object) and am later checking that cache to see if w == XWINDOW
(window). There is no guarantee that the window that I am interested in is the
selected_window, and the functions giving me the w do not provide the window as
an incoming argument. I see that I can use:
Lisp_Object window = window_from_coordinates (f, opoint_x, opoint_y, &part,
true);
get-buffer-window/w->contents is not helpful because there may be more than one
window on the frame displaying the same buffer.
I was wondering if there is a more efficient way to derive window from a struct
window *w?
Thanks,
Keith
- How to get a window Lisp_Object from struct window *w?,
Keith David Bershatsky <=