Skip to content

Drag/move window without decorations? #38

Closed

Description

@awaowouwu

Hello, is it possible to make "backend window" of GLFW draggable for example by grabbing the top "menu bar"?
I'd like to replace OS window decorations with my own, but then I think there's no way to drag the window around.
I don't use fullscreen or docking, I'd just like to render one small window with it.

Activity

  1. pthom commented on Feb 5, 2023

    @pthom
    Owner

    Hello,

    See configWindowsMoveFromTitleBarOnly in ImGui window params

    If false, windows can be dragged from anywhere

  2. pthom commented on Feb 5, 2023

    @pthom
    Owner

    Hello,

    See configWindowsMoveFromTitleBarOnly in ImGui window params

    If false, windows can be dragged from anywhere

    Sorry, this works only for inner ImGui windows, not for the main app window.

  3. pthom commented on Feb 5, 2023

    @pthom
    Owner

    don't use fullscreen or docking, I'd just like to render one small window with it.

    In that case, I don't think of an immediate solution. You may handle this by yourself for example by calling

        auto pos = ImGui::GetMousePos();
        if (pos somewhere near the menu bar)
           if (ImGui::IsMouseDragging(0))
              move the backend window
  4. Repository owner locked and limited conversation to collaborators on Feb 9, 2023
  5. converted this issue into a discussion #45 on Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions