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 477 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by mzimmers
    #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
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by Kent-Dorfman
      #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
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

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

        Kent-DorfmanK 1 Reply Last reply
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 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
          • mzimmersM mzimmers

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

            Kent-DorfmanK Offline
            Kent-DorfmanK Offline
            Kent-Dorfman
            wrote on 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
            • mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0

              • Login

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