1. 21 Dec, 2010 5 commits
  2. 17 Dec, 2010 2 commits
    • Colin Walters's avatar
      gdk: Fix GdkWindowFilter internal refcounting · 806c0441
      Colin Walters authored
      Running gnome-shell under valgrind, I saw the attached invalid write.
      Basically we can destroy a window during event processing, and the old
      window_remove_filters simply called g_free() on the filter, ignoring
      the refcount.  Then later in event processing we call filter->refcount--,
      which is writing to free()d memory.
      
      Fix this by centralizing list mutation and refcount handling inside
      a new shared _gdk_window_filter_unref() function, and using that
      everywhere.
      
      ==13876== Invalid write of size 4
      ==13876==    at 0x446B181: gdk_event_apply_filters (gdkeventsource.c:86)
      ==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
      ==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
      ==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
      ==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
      ==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)
      ==13876==    by 0x4AB806A: g_main_loop_run (gmain.c:3295)
      ==13876==    by 0x8084D6B: main (main.c:722)
      ==13876==  Address 0x1658bcac is 12 bytes inside a block of size 16 free'd
      ==13876==    at 0x4005EAD: free (vg_replace_malloc.c:366)
      ==13876==    by 0x4ABE515: g_free (gmem.c:263)
      ==13876==    by 0x444BCC9: window_remove_filters (gdkwindow.c:1873)
      ==13876==    by 0x4454BA3: _gdk_window_destroy_hierarchy (gdkwindow.c:2043)
      ==13876==    by 0x447BF6E: gdk_window_destroy_notify (gdkwindow-x11.c:1115)
      ==13876==    by 0x43588E2: _gtk_socket_windowing_filter_func (gtksocket-x11.c:518)
      ==13876==    by 0x446B170: gdk_event_apply_filters (gdkeventsource.c:79)
      ==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
      ==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
      ==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
      ==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
      ==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)
      
      https://bugzilla.gnome.org/show_bug.cgi?id=637464
      806c0441
    • Carlos Garnacho's avatar
      Remove *_set_extension_events() and old API to query devices. · 2c8c1c6d
      Carlos Garnacho authored
      The old functions to get core pointer and devices list are gone as
      well. This slice is entirely replaced internally by multidevice
      handling and may just go.
      2c8c1c6d
  3. 15 Dec, 2010 3 commits
    • Carlos Garnacho's avatar
      Add gdk_window_[gs]et_source_events() · 44a7ef7b
      Carlos Garnacho authored
      This function will enable events for all devices of a given
      GdkInputSource, either these available at the time of the call,
      or these that are connected in the future.
      44a7ef7b
    • Carlos Garnacho's avatar
      Add gdk_event_[gs]et_source_device(). · f5a20ab6
      Carlos Garnacho authored
      This function may be used to know the hardware device that triggered
      an event, it could resort to the master device in the few cases there's
      not a direct hardware device to relate to the event (i.e.: crossing events
      due to grabs)
      f5a20ab6
    • Carlos Garnacho's avatar
      Enable XI2 by default · c4a5c2ed
      Carlos Garnacho authored
      gdk_enable_multidevice() has been replaced with gdk_disable_multidevice(),
      so applications may call that function if they want to go back at the
      previous behavior.
      
      There would be usually little reasons to call that function, unless the
      application is doing X calls itself that count on old fashioned core
      devices.
      c4a5c2ed
  4. 06 Dec, 2010 1 commit
  5. 02 Dec, 2010 12 commits
  6. 22 Nov, 2010 1 commit
  7. 14 Oct, 2010 1 commit
  8. 05 Oct, 2010 1 commit
  9. 28 Sep, 2010 1 commit
  10. 26 Sep, 2010 10 commits
  11. 18 Sep, 2010 1 commit
    • Havoc Pennington's avatar
      Revamp and modernize X error traps · b837ef5a
      Havoc Pennington authored
      * add per-display gdk_x11_display_error_trap_push()
        (X11-specific because gdk_error_trap_push() probably
        should have been)
      * make gdk_error_trap_push() handle only GDK displays
        not displays opened without a GDK wrapper
      * make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
        automatically sync only if needed, so manual gdk_flush() is not
        required
      * add gdk_error_trap_pop_ignored() which just asynchronously
        ignores errors, so never needs to sync
      * add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
        if you use plain pop() and don't need the return value,
        the async gdk_error_trap_pop_ignored() should be used
        instead. This results in lots of warnings to clean
        up in a later patch.
      
      The main objective here was to avoid the need to sync just
      to ignore an error. Now, syncing is automatic, and only
      happens when we need to know the error code.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=629608
      b837ef5a
  12. 08 Sep, 2010 1 commit
  13. 16 Aug, 2010 1 commit