[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-winforms-list
Subject:    Re: [Mono-winforms-list] Question on release notes
From:       "Peter Dennis Bartok" <Peter () novonyx ! com>
Date:       2006-08-01 11:37:45
Message-ID: 001e01c6b55e$e8db0960$69c063a4 () pdblaptop
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Before 1.1.16 we stored a WM_PAINT event in the queue whenever we got an ExposeNotify \
for a window. We had some logic so we'd never put more than one for any particular \
window in, and instead just updated the existing region if one already existed, but \
we stored an actual WM_PAINT in the queue and it was processed along with other \
events in order.

Starting with 1.1.16 we matched MS behaviour. MS uses the event queue only for \
keyboard/mouse events (I'm simplifying a tad). Many other messages are sent \
'directly' to the window procedure on Windows, via SendMessage (for example \
WM_WINDOWPOSCHANGED or WM_SETFOCUS, etc). WM_PAINT events are neither. They are \
returned via GetMessage, but they don't come from the queue. Instead, GetMessage \
returns all events from the queue, and once there are no more real events, it looks \
if there are any windows with invalid content. If it firds one, it generates and \
returns a WM_PAINT event for each of these windows, and so on. Starting with 1.1.16 \
our driver behaves like that.  Around the same timeframe we also added \
thread-specific message queues. That means that events events are stored in an event \
queue associated with the thread that created the window, allowing multiple message \
queues to run in parallel in the same app in multiple threads, again matching MS.

Hope my explanation makes sense. If you still have an old MSDN subscription, search \
for the "GetMessage and PeekMessage Internals" article, MS seems to recently have \
removed it from their website or I would have given you a link.

Cheers
       Peter

-----Original Message-----
From: "Dennis Hayes" <dennisdotnet@yahoo.com>
To: <mono-winforms-list@lists.ximian.com>
Date: Tuesday, August 01, 2006 04:17
Subject: [Mono-winforms-list] Question on release notes


  The release notes for 1.1.16 states:
   
  “Repaint logic changed: Instead of having paint events that are contained in the \
queue and make their way to the head of the queue, we now only generate synthetic \
paint events for dirty windows once the queue is empty. This matches MS behavior and \
allows for a more responsive UI if lots of activity (or slow drawing) happens.”  
  Can someone give me a short explanation of that to me?
  I assume it means something like if there are more than one paint event in the que, \
you try to combine them together if possible.  
  I need to explain this to the readers of my “Monkey Business” column, and want to \
get it right.  
  Thanks,
  Dennis


------------------------------------------------------------------------------
  Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting \
at 1˘/min.


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY bgColor=#d4d0c8>
<DIV><FONT face=Arial size=2>Before 1.1.16 we stored a WM_PAINT event in the 
queue&nbsp;whenever we got an ExposeNotify for a window. We had some logic so 
we'd never put more than one for any particular window in, and instead just 
updated the existing region if one already existed, but we stored an actual 
WM_PAINT in the queue and it was processed along with other events in 
order.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Starting with 1.1.16 we matched MS behaviour. MS 
uses the event queue only for keyboard/mouse events (I'm simplifying a 
tad).</FONT></DIV>
<DIV><FONT face=Arial size=2>Many other messages are sent 'directly' to the 
window procedure on Windows, via SendMessage (for example WM_WINDOWPOSCHANGED or 
WM_SETFOCUS, etc).</FONT></DIV>
<DIV><FONT face=Arial size=2>WM_PAINT events are neither. They are returned via 
GetMessage, but they don't come from the queue. Instead, GetMessage returns all 
events from the queue, and once there are no more real events, it looks if there 
are any windows with invalid content. If it firds one, it generates and returns 
a WM_PAINT event for each of these windows, and so on. Starting with 1.1.16 our 
driver behaves like that. </FONT></DIV>
<DIV><FONT face=Arial size=2>Around the same timeframe we also added 
thread-specific message queues. That means that events events are stored in an 
event queue associated with the thread that created the window, allowing 
multiple message queues to run in parallel in the same app in multiple threads, 
again matching MS.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hope my explanation makes sense. If you still have 
an old MSDN subscription, search for the "GetMessage and PeekMessage Internals" 
article, MS seems to recently have removed it from their website or I would have 
given you a link.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Cheers</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peter</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><B>-----Original Message-----</B><BR><B>From: 
</B>"Dennis Hayes" &lt;<A 
href="mailto:dennisdotnet@yahoo.com">dennisdotnet@yahoo.com</A>&gt;<BR><B>To: 
</B>&lt;<A 
href="mailto:mono-winforms-list@lists.ximian.com">mono-winforms-list@lists.ximian.com</A>&gt;<BR><B>Date: \
 </B>Tuesday, August 01, 2006 04:17<BR><B>Subject: </B>[Mono-winforms-list] 
Question on release notes<BR><BR></DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px \
solid"></FONT><SPAN   style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">
  <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN 
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">The release notes 
  for 1.1.16 states:<o:p></o:p></SPAN></DIV>
  <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN 
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: \
Verdana">&nbsp;<o:p></o:p></SPAN></DIV>  <DIV class=MsoNormal style="MARGIN: 0in 0in \
0pt"><SPAN   style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">“Repaint \
logic   changed: Instead of having paint events that are contained in the queue and 
  make their way to the head of the queue, we now only generate synthetic paint 
  events for dirty windows once the queue is empty. This matches MS behavior and 
  allows for a more responsive UI if lots of activity (or slow drawing) 
  happens.”<o:p></o:p></SPAN></DIV>
  <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN 
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: \
Verdana">&nbsp;<o:p></o:p></SPAN></DIV>  <DIV class=MsoNormal style="MARGIN: 0in 0in \
0pt"><SPAN   style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">Can someone \
give me   a short explanation of that to me?<o:p></o:p></SPAN></DIV>
  <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN 
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">I assume it means 
  something like if there are more than one paint event in the que, you try to 
  combine them together if possible.<o:p></o:p></SPAN></DIV>
  <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN 
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: \
Verdana">&nbsp;<o:p></o:p></SPAN></DIV>  <DIV class=MsoNormal style="MARGIN: 0in 0in \
0pt"><SPAN   style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">I need to \
explain   this to the readers of my “Monkey Business” column, and want to get it 
  right.<o:p></o:p></SPAN></DIV>
  <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN 
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: \
Verdana">&nbsp;<o:p></o:p></SPAN></DIV>  <DIV class=MsoNormal style="MARGIN: 0in 0in \
0pt"><SPAN   style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: \
Verdana">Thanks,<o:p></o:p></SPAN></DIV>  <DIV class=MsoNormal style="MARGIN: 0in 0in \
0pt"><SPAN   style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: \
Verdana">Dennis<o:p></o:p></SPAN></DIV>  <DIV class=MsoNormal style="MARGIN: 0in 0in \
0pt"></SPAN></DIV>  <P>
  <HR SIZE=1>
  Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. <A 
  href="http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com">Great \
  rates starting at 1˘/min.</A></BLOCKQUOTE></BODY></HTML>



_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic