title: Sending mouse click events to other windows in Linux without moving the mouse
body: <p>I have a Windows application which I want to port it to Linux. In this application, I send mouse click events to other applications. The function which does the job is like this:</p>
  
  <pre><code>void MainWindow::send_mouse_event(HWND hwnd, int x, int y)
  {
      int coordinate = x | (y &lt;&lt; 16);
      LRESULT res = SendMessage(hwnd, WM_LBUTTONDOWN, 0x00000001, coordinate);
      SendMessage(hwnd, WM_LBUTTONUP, 0x00000000, coordinate);
  }
  </code></pre>
  
  <p>I searched for equivalent code in Linux and I found <a href="https://github.com/jordansissel/xdotool" rel="nofollow noreferrer">xdotool</a>. As far as I understood, using <code>xdotool</code>, you have to move the mouse to a point at first, and then click that point. But in Windows, I could send mouse click events virtually to other windows without moving the mouse. So is the story true about Linux? Is it possible to send a click event to other applications without (really) moving the mouse in Linux? I'm using Ubuntu 18.04.</p>