<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>212453</bug_id>
          
          <creation_ts>2020-05-27 19:19:07 -0700</creation_ts>
          <short_desc>[GTK] Gamepad events do not occur in the flatpak shell.</short_desc>
          <delta_ts>2022-09-17 13:38:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/flatpak/flatpak/issues/7</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>133847</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="ChangSeok Oh">changseok</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>bugzilla</cc>
    
    <cc>clopez</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>pgriffis</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1656735</commentid>
    <comment_count>0</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2020-05-27 19:19:07 -0700</bug_when>
    <thetext>After the gtk port moved to flatpak SDK, any signal from gamepads is not detected by webkit. Perhaps, sandbox of flatpak shell involved but it is not sure. https://github.com/flatpak/flatpak/issues/7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1656793</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2020-05-28 02:15:19 -0700</bug_when>
    <thetext>Maybe Patrick could help here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1657284</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2020-05-29 09:25:38 -0700</bug_when>
    <thetext>ChangSeok, can you check if patching the bubblewrap launcher like in https://bugs.webkit.org/show_bug.cgi?id=212524 would help?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1657285</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2020-05-29 09:27:39 -0700</bug_when>
    <thetext>Ah sorry, it might not help. If I understand the CMake option for this, the launcher is disabled when we build from the SDK:

if (CMAKE_SYSTEM_NAME MATCHES &quot;Linux&quot; AND NOT EXISTS &quot;/.flatpak-info&quot;)
    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BUBBLEWRAP_SANDBOX PUBLIC ON)
else ()
    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BUBBLEWRAP_SANDBOX PUBLIC OFF)
endif ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1657484</commentid>
    <comment_count>4</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2020-05-29 16:05:57 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #3)
&gt; Ah sorry, it might not help. If I understand the CMake option for this, the
&gt; launcher is disabled when we build from the SDK:
&gt; 
&gt; if (CMAKE_SYSTEM_NAME MATCHES &quot;Linux&quot; AND NOT EXISTS &quot;/.flatpak-info&quot;)
&gt;     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BUBBLEWRAP_SANDBOX PUBLIC ON)
&gt; else ()
&gt;     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BUBBLEWRAP_SANDBOX PUBLIC OFF)
&gt; endif ()

You are right. The SDK based webkit build disables ENABLE_BUBBLEWRAP_SANDBOX. I tried to forcedly enable it in flatpak shell but I couldn&apos;t since bwrap is not available in the shell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699344</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2020-10-19 11:54:53 -0700</bug_when>
    <thetext>The following merge request makes libmanette usable inside Flatpak:

  https://gitlab.gnome.org/aplazas/libmanette/-/merge_requests/19

The library needs to be built passing “-Dgudev=disabled” to Meson, and
libmanette will fall back to using “GFileMonitor” on ”/dev/input/*” to
find supported devices, which works inside the Flatpak sandbox if the
application has been configured with “--device=all”, but I suspect that
“--filesystem=/dev/input:ro” might work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699378</commentid>
    <comment_count>6</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2020-10-19 12:44:04 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #5)
&gt; The following merge request makes libmanette usable inside Flatpak:
&gt; 
&gt;   https://gitlab.gnome.org/aplazas/libmanette/-/merge_requests/19
&gt; 
&gt; The library needs to be built passing “-Dgudev=disabled” to Meson, and
&gt; libmanette will fall back to using “GFileMonitor” on ”/dev/input/*” to
&gt; find supported devices, which works inside the Flatpak sandbox if the
&gt; application has been configured with “--device=all”, but I suspect that
&gt; “--filesystem=/dev/input:ro” might work.

It turns out that we already have “--device=all” somewhere, checked with:

  % webkit-flatpak -c grep devices /.flatpak-info
  devices=dri;all;
  %

So for *development* the only moving part missing is compiling libmanette
with “-Dgudev=disabled” and then game pads should work in the MiniBrowser
for development 🙌️</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699380</commentid>
    <comment_count>7</comment_count>
      <attachid>411777</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2020-10-19 12:48:26 -0700</bug_when>
    <thetext>Created attachment 411777
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699667</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2020-10-20 03:53:43 -0700</bug_when>
    <thetext>Committed r268721: &lt;https://trac.webkit.org/changeset/268721&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411777.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>411777</attachid>
            <date>2020-10-19 12:48:26 -0700</date>
            <delta_ts>2020-10-20 03:53:44 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-212453-20201019224824.patch</filename>
            <type>text/plain</type>
            <size>1590</size>
            <attacher name="Adrian Perez">aperez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjY4Njc0CmRpZmYgLS1naXQgYS9Ub29scy9DaGFuZ2VMb2cg
Yi9Ub29scy9DaGFuZ2VMb2cKaW5kZXggMTY0NWRmNjlmZjVlN2U1ZDdkMTE3YmQxZGJlMjM5NDUw
N2M0NGY0NS4uNDNiNzdhMGMwMjdkNThjOGZkN2Y5N2I5MjQ0ODA0ZWI2YzNlMzQ4ZiAxMDA2NDQK
LS0tIGEvVG9vbHMvQ2hhbmdlTG9nCisrKyBiL1Rvb2xzL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3
IEBACisyMDIwLTEwLTE5ICBBZHJpYW4gUGVyZXogZGUgQ2FzdHJvICA8YXBlcmV6QGlnYWxpYS5j
b20+CisKKyAgICAgICAgW0dUS10gR2FtZXBhZCBldmVudHMgZG8gbm90IG9jY3VyIGluIHRoZSBm
bGF0cGFrIHNoZWxsLgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5j
Z2k/aWQ9MjEyNDUzCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAg
ICAgICAgSWYgdGhlIHN1cHBvcnQgZm9yIGd1ZGV2IGlzIGRpc2FibGVkIGluIGxpYm1hb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