Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Preventing window resize on Linux?  (Read 2374 times)

0 Members and 1 Guest are viewing this topic.

tarottots

  • Newbie
  • *
  • Posts: 1
    • View Profile
Preventing window resize on Linux?
« on: April 28, 2017, 11:40:35 pm »
Hi all,

I'm just getting into development on Linux, and I'm having trouble preventing a window resize. Tried looking it up, couldn't find a whole lot of Linux-related info. On Windows, I simply setup my window without sf::Style::Resize and I'm good. However, under Linux (at least under Arch with i3wm+compton) this doesn't work and the user can still resize the window. Is there something specific to Linux I have to do, or is this simply impossible due to the way window managers/compositors work?

Thanks in advance.

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Preventing window resize on Linux?
« Reply #1 on: April 29, 2017, 12:58:58 am »
In my experience with tiling window managers (such as i3, as you mentioned specifically), they take a "the user is always right" approach, often ignoring size requests from windows (except for dialog boxes and the such, although this is often configurable).

A "classic" floating window manager should behave the way you expect. If a user is using a tiling window manager, (in my opinion) it can be assumed the user knows what they want.

I'm not 100% certain, but a workaround might be to have your application provide a floating hint of some sort (I don't recall the API to do this).

 

anything