LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] vt: provide notifications on selection changes
@ 2015-01-23 22:07 Nicolas Pitre
  2015-01-24  2:09 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Pitre @ 2015-01-23 22:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Dave Mielke

The vcs device's poll/fasync support relies on the vt notifier to signal
changes to the screen content.  Notifier invocations were missing for
changes that comes through the selection interface though.  Fix that.

Tested with BRLTTY 5.2.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: Dave Mielke <dave@mielke.cc>

---

Greg: Would be highly convenient to have this patch applied to the 
stable tree as well to help affected blind Linux users via distro 
updates.  Yet it took a while before this issue was discovered. Your 
call.

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index f7f5ed1..84252a0 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -502,6 +502,7 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed)
 #endif
 	if (DO_UPDATE(vc))
 		do_update_region(vc, (unsigned long) p, count);
+	notify_update(vc);
 }
 
 /* used by selection: complement pointer position */
@@ -518,6 +519,7 @@ void complement_pos(struct vc_data *vc, int offset)
 		scr_writew(old, screenpos(vc, old_offset, 1));
 		if (DO_UPDATE(vc))
 			vc->vc_sw->con_putc(vc, old, oldy, oldx);
+		notify_update(vc);
 	}
 
 	old_offset = offset;
@@ -535,8 +537,8 @@ void complement_pos(struct vc_data *vc, int offset)
 			oldy = (offset >> 1) / vc->vc_cols;
 			vc->vc_sw->con_putc(vc, new, oldy, oldx);
 		}
+		notify_update(vc);
 	}
-
 }
 
 static void insert_char(struct vc_data *vc, unsigned int nr)

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

* Re: [PATCH] vt: provide notifications on selection changes
  2015-01-23 22:07 [PATCH] vt: provide notifications on selection changes Nicolas Pitre
@ 2015-01-24  2:09 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2015-01-24  2:09 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: linux-kernel, Dave Mielke

On Fri, Jan 23, 2015 at 05:07:21PM -0500, Nicolas Pitre wrote:
> The vcs device's poll/fasync support relies on the vt notifier to signal
> changes to the screen content.  Notifier invocations were missing for
> changes that comes through the selection interface though.  Fix that.
> 
> Tested with BRLTTY 5.2.
> 
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> Cc: Dave Mielke <dave@mielke.cc>
> 
> ---
> 
> Greg: Would be highly convenient to have this patch applied to the 
> stable tree as well to help affected blind Linux users via distro 
> updates.  Yet it took a while before this issue was discovered. Your 
> call.

Ok, that sounds good, I'll queue this up for 3.20-rc1 and mark it for
stable so it will get backported.

thanks,

greg k-h

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

end of thread, other threads:[~2015-01-24  2:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 22:07 [PATCH] vt: provide notifications on selection changes Nicolas Pitre
2015-01-24  2:09 ` Greg Kroah-Hartman

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 NNTP newsgroup(s).