Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

How to set the player window to be always on top in Linux?

Discussion in 'Linux' started by SimonJ9, May 27, 2022.

  1. SimonJ9

    SimonJ9

    Joined:
    Feb 5, 2018
    Posts:
    17
    Hi everyone, I have 2 separate Unity projects running on Linux Mint / Ubuntu. Both builds are running without problems. There is a button in the first game which launches the second game as a new process. I'm trying to make the second player window always stay on top of the first window. What api should I use? And if possible, I would like to maximize the first game window when the second game is closed. Is there any equivalent library such as user32.dll on Windows?
     
  2. KevinWelton

    KevinWelton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    239
    Are you asking if there is a library you can P/Invoke into like user32 APIs?
     
  3. SimonJ9

    SimonJ9

    Joined:
    Feb 5, 2018
    Posts:
    17
    Something similar to that. I made a custom library in C to take care of all the non-Unity functions and I DllImport that library. I'm wondering if there is any API that allows me to implement a function like "SetWindowToTop()" and "MinimizeWindow()" in my library and let the Unity player call it. I found something related to X11, but haven't figured it out completely.