* Make raise-frame work on Cygwin
@ 2012-05-16 23:44 Katsumi Yamaoka
2012-05-17 6:59 ` Katsumi Yamaoka
2012-05-17 9:09 ` martin rudalics
0 siblings, 2 replies; 9+ messages in thread
From: Katsumi Yamaoka @ 2012-05-16 23:44 UTC (permalink / raw)
To: emacs-devel
Hi,
raise-frame doesn't pop up an existing frame on Cygwin (rootless).
If there are many frames on a Windows screen, we have no means to
pop up a certain Emacs frame that is hidden by the other frames,
except for manually digging it up by mouse. But at last I found
a workaround:
(defadvice raise-frame (before make-it-work (&optional frame) activate)
"Make it work on Cygwin."
(when frame (make-frame-invisible frame)))
iconify-frame instead of make-frame-invisible there has no effect.
It also revealed that some ELisp applications call raise-frame two
or more times at a time since a raised frame blinks. ;-)
BTW, I still use wmctrl on Fedora:
http://lists.gnu.org/archive/html/emacs-devel/2006-10/msg01117.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-16 23:44 Make raise-frame work on Cygwin Katsumi Yamaoka
@ 2012-05-17 6:59 ` Katsumi Yamaoka
2012-05-17 11:42 ` Katsumi Yamaoka
2012-05-17 9:09 ` martin rudalics
1 sibling, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2012-05-17 6:59 UTC (permalink / raw)
To: emacs-devel
Katsumi Yamaoka wrote:
> raise-frame doesn't pop up an existing frame on Cygwin (rootless).
> If there are many frames on a Windows screen, we have no means to
> pop up a certain Emacs frame that is hidden by the other frames,
> except for manually digging it up by mouse. But at last I found
> a workaround:
> (defadvice raise-frame (before make-it-work (&optional frame) activate)
> "Make it work on Cygwin."
> (when frame (make-frame-invisible frame)))
Some program tries to raise the selected frame even if it is
the sole one, so this should be turned into:
(defadvice raise-frame (before make-it-work (&optional frame) activate)
"Make it work on Cygwin."
(when (and frame (not (eq frame (selected-frame))))
(make-frame-invisible frame)))
> iconify-frame instead of make-frame-invisible there has no effect.
> It also revealed that some ELisp applications call raise-frame two
> or more times at a time since a raised frame blinks. ;-)
> BTW, I still use wmctrl on Fedora:
> http://lists.gnu.org/archive/html/emacs-devel/2006-10/msg01117.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-17 6:59 ` Katsumi Yamaoka
@ 2012-05-17 11:42 ` Katsumi Yamaoka
2012-05-17 12:37 ` martin rudalics
0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2012-05-17 11:42 UTC (permalink / raw)
To: emacs-devel
Katsumi Yamaoka wrote:
>> (defadvice raise-frame (before make-it-work (&optional frame) activate)
>> "Make it work on Cygwin."
>> (when frame (make-frame-invisible frame)))
> Some program tries to raise the selected frame even if it is
> the sole one, so this should be turned into:
> (defadvice raise-frame (before make-it-work (&optional frame) activate)
> "Make it work on Cygwin."
> (when (and frame (not (eq frame (selected-frame))))
> (make-frame-invisible frame)))
Sorry for the noises. Here is the third time lucky:
(defadvice raise-frame (before make-it-work (&optional frame) activate)
"Make it work on Cygwin."
(when (and frame (cdr (frame-list)))
(make-frame-invisible frame)))
This works with `select-frame-set-input-focus'.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-17 11:42 ` Katsumi Yamaoka
@ 2012-05-17 12:37 ` martin rudalics
0 siblings, 0 replies; 9+ messages in thread
From: martin rudalics @ 2012-05-17 12:37 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: emacs-devel
> (defadvice raise-frame (before make-it-work (&optional frame) activate)
> "Make it work on Cygwin."
> (when (and frame (cdr (frame-list)))
I suppose you want to check here whether another frame but the selected
one exists. What if all other frames are invisible?
> (make-frame-invisible frame)))
>
> This works with `select-frame-set-input-focus'.
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-16 23:44 Make raise-frame work on Cygwin Katsumi Yamaoka
2012-05-17 6:59 ` Katsumi Yamaoka
@ 2012-05-17 9:09 ` martin rudalics
2012-05-17 11:30 ` Achim Gratz
2012-05-17 11:42 ` Katsumi Yamaoka
1 sibling, 2 replies; 9+ messages in thread
From: martin rudalics @ 2012-05-17 9:09 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: emacs-devel
> raise-frame doesn't pop up an existing frame on Cygwin (rootless).
> If there are many frames on a Windows screen, we have no means to
> pop up a certain Emacs frame that is hidden by the other frames,
> except for manually digging it up by mouse.
Probably a silly question: What does Cygwin do to pop it up when you are
"manually digging it up by mouse"? Or is Cygwin bypassed by Windows in
that case?
> But at last I found
> a workaround:
>
> (defadvice raise-frame (before make-it-work (&optional frame) activate)
> "Make it work on Cygwin."
> (when frame (make-frame-invisible frame)))
> iconify-frame instead of make-frame-invisible there has no effect.
Dead-ugly. Nevertheless, we should provide support for that, e.g., by
introducing a `raise-frame-function' variable.
> It also revealed that some ELisp applications call raise-frame two
> or more times at a time since a raised frame blinks. ;-)
Ideally, these `raise-frame' calls are idempotent. Unfortunately,
sampling frame visibility is not that trivial.
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-17 9:09 ` martin rudalics
@ 2012-05-17 11:30 ` Achim Gratz
2012-05-17 12:37 ` martin rudalics
2012-05-17 11:42 ` Katsumi Yamaoka
1 sibling, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2012-05-17 11:30 UTC (permalink / raw)
To: emacs-devel
martin rudalics writes:
> Probably a silly question: What does Cygwin do to pop it up when you are
> "manually digging it up by mouse"? Or is Cygwin bypassed by Windows in
> that case?
Cygwin's X server has a built-in rootless window manager that makes the
windows from X appear just like any other Windows application that are
then (mostly) under control of the Windows desktop (aka explorer.exe),
in particular they'll have an icon in the task bar.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-17 11:30 ` Achim Gratz
@ 2012-05-17 12:37 ` martin rudalics
0 siblings, 0 replies; 9+ messages in thread
From: martin rudalics @ 2012-05-17 12:37 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-devel
> Cygwin's X server has a built-in rootless window manager that makes the
> windows from X appear just like any other Windows application that are
> then (mostly) under control of the Windows desktop (aka explorer.exe),
> in particular they'll have an icon in the task bar.
IIUC there's no way for an application running under Cygwin to emulate
the mechanism used by the explorer?
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-17 9:09 ` martin rudalics
2012-05-17 11:30 ` Achim Gratz
@ 2012-05-17 11:42 ` Katsumi Yamaoka
2012-05-17 12:37 ` martin rudalics
1 sibling, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2012-05-17 11:42 UTC (permalink / raw)
To: martin rudalics; +Cc: emacs-devel
martin rudalics wrote:
>> raise-frame doesn't pop up an existing frame on Cygwin (rootless).
>> If there are many frames on a Windows screen, we have no means to
>> pop up a certain Emacs frame that is hidden by the other frames,
>> except for manually digging it up by mouse.
> Probably a silly question: What does Cygwin do to pop it up when you are
> "manually digging it up by mouse"? Or is Cygwin bypassed by Windows in
> that case?
I don't know at all. What I only do is, for instance, to type
`M-x gnus-other-frame RET' to raise an existing Gnus frame up.
`gnus-other-frame' runs `select-frame-set-input-focus' for the
Gnus frame in question, nevertheless I thereafter need to
dislodge or iconify other frames one by one by mouse till a Gnus
frame is found. :<
>> But at last I found
>> a workaround:
>>
>> (defadvice raise-frame (before make-it-work (&optional frame) activate)
>> "Make it work on Cygwin."
>> (when frame (make-frame-invisible frame)))
>> iconify-frame instead of make-frame-invisible there has no effect.
> Dead-ugly. Nevertheless, we should provide support for that, e.g., by
> introducing a `raise-frame-function' variable.
What I really want is to improve Emacs so as to communicate with
common window managers, including that of Windows 7, metacity...
Though all window managers may perhaps not offer the complete set
of interface.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Make raise-frame work on Cygwin
2012-05-17 11:42 ` Katsumi Yamaoka
@ 2012-05-17 12:37 ` martin rudalics
0 siblings, 0 replies; 9+ messages in thread
From: martin rudalics @ 2012-05-17 12:37 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: emacs-devel
> I don't know at all. What I only do is, for instance, to type
> `M-x gnus-other-frame RET' to raise an existing Gnus frame up.
> `gnus-other-frame' runs `select-frame-set-input-focus' for the
> Gnus frame in question, nevertheless I thereafter need to
> dislodge or iconify other frames one by one by mouse till a Gnus
> frame is found. :<
I remember this problem from our `display-buffer' discussion and it's
obvious that this should be solved in some way.
> What I really want is to improve Emacs so as to communicate with
> common window managers, including that of Windows 7, metacity...
> Though all window managers may perhaps not offer the complete set
> of interface.
A `raise-frame-function' variable would allow to do this without any
defadvice.
martin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-05-17 12:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-16 23:44 Make raise-frame work on Cygwin Katsumi Yamaoka
2012-05-17 6:59 ` Katsumi Yamaoka
2012-05-17 11:42 ` Katsumi Yamaoka
2012-05-17 12:37 ` martin rudalics
2012-05-17 9:09 ` martin rudalics
2012-05-17 11:30 ` Achim Gratz
2012-05-17 12:37 ` martin rudalics
2012-05-17 11:42 ` Katsumi Yamaoka
2012-05-17 12:37 ` martin rudalics
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).