Re: With set_event_compression, most recent motion event is held in waiting

Kjell Ahlstedt via gtkmm-list <[email protected]> Tue, 24 May 2022 19:24:10 +0200
Newsgroups gmane.comp.gnome.gtkmm
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============8280617364055627414==
Content-Type: multipart/alternative;
 boundary="------------b8bGkdVv0PDWATt8lD6Dtz5e"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------b8bGkdVv0PDWATt8lD6Dtz5e
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

I made a few changes in gtk/gdk/gdkevents.c, 
_gdk_event_queue_handle_motion_compression(). 
gdk_frame_clock_request_phase (clock, 
GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS) at the end of the function is always 
called. Without event compression I get an output such as

276 motion 122.582:89.4453
277 motion 123.582:88.4453
278 motion 124.582:88.4453
279 motion 124.582:87.4453

Then when I press a mouse button:

(example:17002): Gdk-CRITICAL **: 19:11:02.499: 
gdk_window_get_frame_clock: assertion 'GDK_IS_WINDOW (window)' failed
280 button pressed 124.582:87.4453

(example:17002): Gdk-CRITICAL **: 19:11:02.587: 
gdk_window_get_frame_clock: assertion 'GDK_IS_WINDOW (window)' failed
281 button released 124.582:87.4453

The same coordinates as in the last motion event. No motion event when 
the mouse button is pressed.

The critical messages show that my changes of 
_gdk_event_queue_handle_motion_compression() is not the right solution, 
but the behavior shows (I believe) that the last motion event before the 
mouse click is available somewhere in GTK before the mouse is clicked.

Den 2022-05-24 kl. 03:40, skrev JLM via gtkmm-list:
> I have managed to cobble together a program in C which does the same
> thing and confirmed that it is not a specific GTKMM problem at least.
>
--------------b8bGkdVv0PDWATt8lD6Dtz5e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font size="2">I made a few changes in gtk/gdk/gdkevents.c,
        _gdk_event_queue_handle_motion_compression().
        gdk_frame_clock_request_phase (clock,
        GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS) at the end of the function
        is always called. Without event compression I get an output such
        as</font></p>
    <p><font size="2">276 motion 122.582:89.4453 <br>
        277 motion 123.582:88.4453 <br>
        278 motion 124.582:88.4453 <br>
        279 motion 124.582:87.4453 <br>
      </font></p>
    <p><font size="2">Then when I press a mouse button:</font></p>
    <p><font size="2">(example:17002): Gdk-CRITICAL **: 19:11:02.499:
        gdk_window_get_frame_clock: assertion 'GDK_IS_WINDOW (window)'
        failed <br>
        280 button pressed 124.582:87.4453 <br>
         <br>
        (example:17002): Gdk-CRITICAL **: 19:11:02.587:
        gdk_window_get_frame_clock: assertion 'GDK_IS_WINDOW (window)'
        failed <br>
        281 button released 124.582:87.4453 <br>
      </font></p>
    <p><font size="2">The same coordinates as in the last motion event.
        No motion event when the mouse button is pressed.</font></p>
    <p><font size="2">The critical messages show that my changes of
        _gdk_event_queue_handle_motion_compression() is not the right
        solution, but the behavior shows (I believe) that the last
        motion event before the mouse click is available somewhere in
        GTK before the mouse is clicked.<br>
      </font></p>
    <div class="moz-cite-prefix"><font size="2">Den 2022-05-24 kl.
        03:40, skrev JLM via gtkmm-list:<br>
      </font></div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre class="moz-quote-pre" wrap="">I have managed to cobble together a program in C which does the same
thing and confirmed that it is not a specific GTKMM problem at least.

</pre>
    </blockquote>
  </body>
</html>

--------------b8bGkdVv0PDWATt8lD6Dtz5e--

--===============8280617364055627414==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

--===============8280617364055627414==--