Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. event filters for Linux
Forum Updated to NodeBB v4.3 + New Features

event filters for Linux

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 459 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mzimmers
    wrote on 12 Dec 2020, 01:55 last edited by mzimmers 12 Dec 2020, 01:56
    #1

    Hi all -

    Awhile back, I posted here about trapping serial port events on Windows. Now I need to implement this for Linux. According to the docs:

    On X11, eventType is set to "xcb_generic_event_t", and the message can be casted to a xcb_generic_event_t pointer.
    

    Can anyone tell me what the relevant contents of xcb_generic_event_t will be when a serial device is plugged or unplugged? I don't have a Linux machine to test on right now, so I'm throwing this over the fence to someone.

    Thanks...

    1 Reply Last reply
    -1
    • K Offline
      K Offline
      Kent-Dorfman
      wrote on 12 Dec 2020, 02:33 last edited by Kent-Dorfman 12 Dec 2020, 02:35
      #2

      X11 in linux knows nothing about serial ports, unless you are using some weird mouse that is connected via a comm port, so you cannot trap anything serial using the X11 protocol. The linux device hotplug facility is called udev.

      I light my way forward with the fires of all the bridges I've burned behind me.

      1 Reply Last reply
      2
      • M Offline
        M Offline
        mzimmers
        wrote on 12 Dec 2020, 03:09 last edited by
        #3

        OK, so in Linux, a new device isn't created when something is plugged in?

        K 1 Reply Last reply 12 Dec 2020, 16:57
        0
        • C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 12 Dec 2020, 08:09 last edited by
          #4

          @mzimmers said in event filters for Linux:

          a new device isn't created when something is plugged in?

          It is, and already answered by @Kent-Dorfman :

          The linux device hotplug facility is called udev.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1
          • M mzimmers
            12 Dec 2020, 03:09

            OK, so in Linux, a new device isn't created when something is plugged in?

            K Offline
            K Offline
            Kent-Dorfman
            wrote on 12 Dec 2020, 16:57 last edited by
            #5

            @mzimmers
            In Linux X11 is just an app, so it doesn't manage the system like in windoze...of course the script kiddies of the 21st century have done everything possible to obfuscate that distinction so that the windoze crowd feels more comfortable in Linux by only ever seeing the GUI.

            I light my way forward with the fires of all the bridges I've burned behind me.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mzimmers
              wrote on 12 Dec 2020, 19:36 last edited by
              #6

              OK, thanks, guys. I guess I'll look at the udev API.

              1 Reply Last reply
              0

              1/6

              12 Dec 2020, 01:55

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved