1. 18 Dec, 2018 2 commits
    • Peter Hutterer's avatar
      x11: don't add unknown tools to our list · c6dd9229
      Peter Hutterer authored
      Generic tools (Bamboo, built-in tablets) always have the same serial number
      assigned by the wacom driver. This includes the touch tool when the wacom
      driver handles the touch evdev node (common where users require the wacom
      gestures to work).
      
      When the first device is the touch device, a tool is created with that serial.
      All future tools now return the touch tool on lookup since they all share the
      same serial number. Worse, this happens *across* devices, so the pen
      event node gets assigned the touch tool because they all have the same serial.
      
      Since we don't actually care about the touch as a tool, let's skip any unknown
      tool. This captures pads as well.
      c6dd9229
    • Peter Hutterer's avatar
      x11: get the tool type from the wacom driver properties · f173d1bc
      Peter Hutterer authored
      Any wacom device currently sets the tool type to UNKNOWN. The wacom driver has
      a property that exports the tool type as one of stylus, eraser, cursor, pad or
      touch. Only three of those are useful here but that's better than having all
      of them as unknown.
      f173d1bc
  2. 12 Dec, 2018 1 commit
    • Szunti's avatar
      Add gdk_x11_display_get_parent_relative_pattern(). · 4c8fcd6a
      Szunti authored
      Fixes #1280, tray icons not drawing background. This is a magic pattern only
      usable for gdk_window_set_background_pattern() that sets the underlying
      X window's background to ParentRelative.
      4c8fcd6a
  3. 08 Dec, 2018 17 commits
  4. 07 Dec, 2018 1 commit
    • Christoph Reiter's avatar
      GDK W32: Always set gtk-font-name to the active UI font. Fixes #1484 · 9e7cc89f
      Christoph Reiter authored
      This makes apps use "Segoe UI 9" by default instead of whatever matches "Sans 10".
      It also cleans up the code and uses some new pango API while at it.
      
      This was previously disabled in 9e686d1f because it led to a poor glyph coverage
      on certain versions of Windows which don't default to "Segoe UI 9" (Chinese, Korean, ..)
      because the font fallback list was missing in pango.
      
      This is about to get fixed in pango!34
      so enable it again when we detect a new enough pango version.
      9e7cc89f
  5. 01 Dec, 2018 1 commit
    • Christoph Reiter's avatar
      GDK W32: set default settings for fontconfig · 5a23c0f0
      Christoph Reiter authored
      Enables hinting, antialiasing and set the subpixel orientation according to the
      active clear type setting. This ensures that font rendering with the fontconfig backend
      looks similar to the win32 backend, at least with the default system font.
      5a23c0f0
  6. 24 Nov, 2018 1 commit
    • Christoph Reiter's avatar
      win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408 · 83204dd8
      Christoph Reiter authored
      GTK widgets expect the scroll deltas to be 1 or -1 and calculate a scroll value from that.
      Multiplying the delta by the Windows scroll line setting (which defaults to 3) results
      in a much larger delta and vastly different behaviour for running a GTK app on Windows
      vs on Linux. For example text view and tree view scroll by 9 lines per scroll wheel tick
      per default this way while on Linux it is around 3.
      
      Remove the multiplication for now.
      83204dd8
  7. 18 Nov, 2018 1 commit
  8. 17 Nov, 2018 1 commit
  9. 14 Nov, 2018 1 commit
  10. 12 Nov, 2018 1 commit
  11. 05 Nov, 2018 1 commit
  12. 04 Nov, 2018 3 commits
  13. 29 Oct, 2018 1 commit
  14. 20 Oct, 2018 1 commit
  15. 19 Oct, 2018 2 commits
  16. 14 Oct, 2018 1 commit
    • Uli Schlachter's avatar
      Fix race in GtkPlug window creation · 9ca38c46
      Uli Schlachter authored
      According to the XEmbed specification, a window should be created
      "elsewhere" and then reparented into the target parent window. Instead,
      GTK+ creates the window directly in desired target parent window. This
      allows some races to occur.
      
      Another program that does not follow XEmbed is tabbed. XEmbed requires
      an _XEMBED_INFO property on the to-be-embedded window, but tabbed does
      not check for this property. Thus, as soon as GTK+ creates its window,
      tabbed starts managing this window and now GTK+ setting up the window
      races with tabbed starting to manage the window.
      
      If tabbed is fast enough to map the window, GTK+ never sees a MapNotify
      event, because it did not yet select StructureNotifyMask on its window.
      This results in a black window inside of tabbed.
      
      Note that this cannot really be fixed in tabbed, since XEmbed says that
      the _XEMBED_INFO property must be already present when the window
      appears. Thus, patching tabbed to wait for _XEMBED_INFO to appear is not
      something that the spec requires/allows.
      
      Instead, this commit changes GTK+ so that it directly sets the right
      event mask when the window is created. This means that there is no more
      race between tabbed mapping the window and GTK+ selecting
      StructureNotifyMask.
      
      Note that the proper fix would be to do as XEmbed requires: Create the
      window elsewhere and then reparent it into the target window. However,
      that would require a more invasive patch, so this commit only takes the
      "easy approach" of fixing this one race. Hopefully, all the other races
      that can occur during window setup are harmless, because the
      embedder/socket will hopefully watch for PropertyNotify events as
      needed.
      
      Fixes: #757
      See-also: https://github.com/awesomeWM/awesome/issues/2385Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
      9ca38c46
  17. 10 Oct, 2018 1 commit
  18. 07 Oct, 2018 1 commit
    • LRN's avatar
      GDK W32: Be honest about supported clipboard formats · f0959c9c
      LRN authored
      Do not lie to W32 about the formats that we provide or accept.
      
      Originally the logic behind such lies was that GdkPixbuf allows
      us to convert any supported image to BMP or PNG, and therefore
      we should announce that we always provide/accept BMP and PNG along
      with other formats.
      
      But that's not how it works. The conversion between formats happens
      at GTK level in GtkClipboard or, if GtkClipboard is not used, with
      gtk_target_list_add_image_targets() to announce all supported image
      formats, and with gtk_selection_data_set_pixbuf() to convert from
      any GdkPixbuf formats to the format requested by the selection, and
      with gtk_selection_data_get_pixbuf() to convert from the selection
      format to GdkPixbuf, if supported.
      
      GDK simply does not play any role in this. Therefore W32 GDK backend
      should only offer formats that it can actually do conversion for
      by itself (such as image/bmp <-> CF_DIB,
      or text/uri-list <-> CFSTR_SHELLIDLIST).
      f0959c9c
  19. 06 Oct, 2018 1 commit
    • LRN's avatar
      GDK W32: Support switching input modules at runtime · d26c11f0
      LRN authored
      This leverages the normal input module switching mechanism in GTK
      by making it think that the gtk-im-module setting changed.
      The backend returns gtk-im-module value as "ime" if W32
      IME API says that an IME is in use. Otherwise it returns
      and empty string - this still triggers an input module
      loading code, which, not being able to load the desired module
      (which is and empty string), falls back to looking at current
      keyboard layout.
      
      Paired with the code that signals gtk-im-module change on keyboard layout
      switches, this is sufficient to make GTK capable of loading appropriate
      input modules at runtime. At least, the kinds of modules that specify
      languages for which they are loaded automatically by default, and the
      IME module.
      
      Loading other kinds of input modules might still work via specifying
      the gtk-im-module setting in gtk ini file, but doing so will likely
      make GTK incapable of loading the IME input module that is used
      for Korean, Chinese and Japanese (and some other languages).
      
      Until someone figures out a way to actually change gtk-im-module
      setting on Windows at runtime with meaningful values, the behaviour
      introduced by this commit seems like a sufficient workaround.
      d26c11f0
  20. 24 Sep, 2018 1 commit