all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Buttons in Customize buffers
@ 2005-01-22 11:24 Eli Zaretskii
  2005-01-22 16:12 ` Stefan Monnier
  2005-01-22 23:39 ` Kim F. Storm
  0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2005-01-22 11:24 UTC (permalink / raw)


Buttons in Customize buffers used to have a special mouse-face, but
that was removed in favor of changing the mouse pointer shape by this
change:

    2004-06-08  Kim F. Storm  <storm@cua.dk>

	    * wid-edit.el (widget-specify-button): Use hand pointer rather
	    than mouse-face as visible mouse-over effect.

That is okay for graphics displays, but not for mouse-capable text
terminals, since the latter cannot change the mouse pointer shape.
The MS-DOS terminal is one case, but I'm guessing that non-windows
sessions on an xterm with xt-mouse loaded are suffering from the same
problem.

Is the following change okay to install?

Index: lisp/wid-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/wid-edit.el,v
retrieving revision 1.134
diff -u -r1.134 wid-edit.el
--- lisp/wid-edit.el	27 Dec 2004 16:38:57 -0000	1.134
+++ lisp/wid-edit.el	22 Jan 2005 11:22:52 -0000
@@ -391,7 +391,11 @@
     (overlay-put overlay 'evaporate t)
     ;; We want to avoid the face with image buttons.
     (unless (widget-get widget :suppress-face)
-      (overlay-put overlay 'face (widget-apply widget :button-face-get)))
+      (overlay-put overlay 'face (widget-apply widget :button-face-get))
+      ; Text terminals cannot change mouse pointer shape, so use mouse
+      ; face instead.
+      (or (display-graphic-p)
+	  (overlay-put overlay 'mouse-face widget-mouse-face)))
     (overlay-put overlay 'pointer 'hand)
     (overlay-put overlay 'follow-link follow-link)
     (overlay-put overlay 'help-echo help-echo)))

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Buttons in Customize buffers
  2005-01-22 11:24 Buttons in Customize buffers Eli Zaretskii
@ 2005-01-22 16:12 ` Stefan Monnier
  2005-01-22 16:26   ` Eli Zaretskii
  2005-01-22 23:39 ` Kim F. Storm
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2005-01-22 16:12 UTC (permalink / raw)
  Cc: emacs-devel

> That is okay for graphics displays, but not for mouse-capable text
> terminals, since the latter cannot change the mouse pointer shape.
> The MS-DOS terminal is one case, but I'm guessing that non-windows
> sessions on an xterm with xt-mouse loaded are suffering from the same
> problem.

> Is the following change okay to install?

Could the MS-DOS code be changed to recognize the `pointer' property and do
something with it?  Maybe by adding a ms-dos-pointer-to-mouse-face-alist
that tells which mouse-face to use for which value of `pointer'?


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Buttons in Customize buffers
  2005-01-22 16:12 ` Stefan Monnier
@ 2005-01-22 16:26   ` Eli Zaretskii
  2005-01-22 16:41     ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2005-01-22 16:26 UTC (permalink / raw)
  Cc: emacs-devel

> Cc: emacs-devel@gnu.org
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sat, 22 Jan 2005 11:12:47 -0500
> 
> Could the MS-DOS code be changed to recognize the `pointer' property and do
> something with it?

It could, but why?  What is the purpose of emulating pointer shape
change with something utterly unrelated?  That could bite us down the
road, if some Lisp code changes the mouse pointer to signal something
other than a link.

Are there any downsides to my suggested patch?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Buttons in Customize buffers
  2005-01-22 16:26   ` Eli Zaretskii
@ 2005-01-22 16:41     ` Stefan Monnier
  2005-01-22 19:11       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2005-01-22 16:41 UTC (permalink / raw)
  Cc: emacs-devel

>> Could the MS-DOS code be changed to recognize the `pointer' property and do
>> something with it?

> It could, but why?  What is the purpose of emulating pointer shape
> change with something utterly unrelated?  That could bite us down the
> road, if some Lisp code changes the mouse pointer to signal something
> other than a link.

> Are there any downsides to my suggested patch?

I didn't mean it as an alternative to your patch.


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Buttons in Customize buffers
  2005-01-22 16:41     ` Stefan Monnier
@ 2005-01-22 19:11       ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2005-01-22 19:11 UTC (permalink / raw)
  Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sat, 22 Jan 2005 11:41:29 -0500
> Cc: emacs-devel@gnu.org
> 
> I didn't mean it as an alternative to your patch.

Sorry, I misunderstood you, then.

Were you suggesting a way to implement mouse pointer shape control in
the MS-DOS port?  If so, I decided long ago not to, as I didn't see
any reasonable way to do that, and didn't think the DOS port is
important enough to have this feature.

The gory details are that on plain DOS machine, there's a system call
to modify the pointer shape into something other than a horizontal bar
of some height, but doing so causes the character under the pointer to
become unreadable (it's replaced by the mouse pointer).  On Windows
(and most DJGPP users run DJGPP programs on Windows these days), the
mouse pointer is what Windows creates, and I know of no way for a DOS
program to request that the pointer shape be changed.  Faced with
these problems, I decided not to implement the feature.

If someone has ideas how to implement this, I'm all ears.  I'd also
consider some emulation, but the emulation should have some
resemblance to the mouse pointer, not to the text it hovers above.

TIA

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Buttons in Customize buffers
  2005-01-22 11:24 Buttons in Customize buffers Eli Zaretskii
  2005-01-22 16:12 ` Stefan Monnier
@ 2005-01-22 23:39 ` Kim F. Storm
  2005-01-29 13:23   ` Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Kim F. Storm @ 2005-01-22 23:39 UTC (permalink / raw)
  Cc: emacs-devel

"Eli Zaretskii" <eliz@gnu.org> writes:

> Is the following change okay to install?

I don't see any problem with it.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Buttons in Customize buffers
  2005-01-22 23:39 ` Kim F. Storm
@ 2005-01-29 13:23   ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2005-01-29 13:23 UTC (permalink / raw)
  Cc: emacs-devel

> Cc: emacs-devel@gnu.org
> From: storm@cua.dk (Kim F. Storm)
> Date: Sun, 23 Jan 2005 00:39:03 +0100
> 
> "Eli Zaretskii" <eliz@gnu.org> writes:
> 
> > Is the following change okay to install?
> 
> I don't see any problem with it.

Thanks for the feedback.  Committed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-01-29 13:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-22 11:24 Buttons in Customize buffers Eli Zaretskii
2005-01-22 16:12 ` Stefan Monnier
2005-01-22 16:26   ` Eli Zaretskii
2005-01-22 16:41     ` Stefan Monnier
2005-01-22 19:11       ` Eli Zaretskii
2005-01-22 23:39 ` Kim F. Storm
2005-01-29 13:23   ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.