Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup without input blocking? #718

Open
harold-b opened this issue Jun 28, 2016 · 35 comments
Open

Popup without input blocking? #718

harold-b opened this issue Jun 28, 2016 · 35 comments

Comments

@harold-b
Copy link

harold-b commented Jun 28, 2016

Hello, fantastic library!

I'm trying to implement an autocomplete popup, but I've not been able to find a way to create a popup that can received mouse input and not block input from flowing through the underlying windows.

To be more specific of the context in which I'm trying to use it. I'd like to create an autocomplete popup a la google search. In which the popup does not close when you click elsewhere, you can hover and click it's items, and the input box ( or other widget ) retains keyboard input throughout.

Example:
imgui_popup

Is it possible to do currently with the public API?

Thank you.

@harold-b
Copy link
Author

I got it working... The biggest issues was that I wanted the helper window to show on top of the console, which is why I was having a hard time... Since by using a popup, whatever is underneath it loses input. I ended up managing to get it to work by having the console window use the ImGuiWindowFlags_NoBringToFrontOnFocus flag while the history window is showing. Then drawing the popup as a regular window after the console. This ensures that it's always on top of it and I still retain keyboard input on the console. I then hacked around listening to the keyboard events on the input box to control the selection and scrolling on the history window. Had I opted for having it pop-up below the console window, it would have been simple... But I really wanted it above! :)

Results:
console_01
anim

@ocornut
Copy link
Owner

ocornut commented Jun 29, 2016

Nice! Sorry I hadn't had time to look into this in details. I was thinking about ChildWindow would provide something close to what you want but haven't looked at all the input details yet.
Have you had to make a change to imgui.cpp to get it working?

@harold-b
Copy link
Author

No worries at all!

I didn't have to make any changes whatsoever to imgui.cpp, managed to get it functioning with just the public API, thankfully. Though I'm eager to dig into the internals I'm in a rush to get back to another task and was hoping to avoid it for the time being.

Here's another little gif showing mouse interaction with the windows as well, since I forgot it on the other gif.
anim2

A ChildWindow or some sort of per-window z-layering (which I guess itself a child window of sorts) would certainly be useful for these types of situations.

@ocornut
Copy link
Owner

ocornut commented Jul 29, 2016

@harold-b Could you clarify your description and maybe provide pseudo-code? I am interested in this and investigating if it can be made easier to the end-user.

I got it working... The biggest issues was that I wanted the helper window to show on top of the console, which is why I was having a hard time... Since by using a popup, whatever is underneath it loses input. I ended up managing to get it to work by having the console window use the ImGuiWindowFlags_NoBringToFrontOnFocus flag while the history window is showing. Then drawing the popup as a regular window after the console. This ensures that it's always on top of it and I still retain keyboard input on the console. I then hacked around listening to the keyboard events on the input box to control the selection and scrolling on the history window. Had I opted for having it pop-up below the console window, it would have been simple... But I really wanted it above! :)

@ocornut
Copy link
Owner

ocornut commented Jul 29, 2016

The dumb version that you can't interact with is to use a tooltip (created within the calback because we love living dangerously!)

if (data->EventFlag == ImGuiInputTextFlags_CallbackAlways && candidates.Size > 0)
{
    ImGui::SetNextWindowPos(ImVec2(ImGui::GetItemRectMin().x, ImGui::GetItemRectMax().y));
    ImGui::SetNextWindowSize(ImVec2(200,400));
    ImGui::BeginTooltip();
    for (int i = 0; i < candidates.Size; i++)
        ImGui::TextUnformatted(candidates[i]);
    ImGui::EndTooltip();
}

completion

@harold-b
Copy link
Author

The dumb version that you can't interact with is to use a tooltip (created within the calback because we love living dangerously!)

Why you daredevil! :rage2:

Here's an image to facilitate explaining more specifically what I wanted to achieve, realizing now my initial description was lacking:

mguiwin

What I wanted to do was open an arbitrary #popup window that shows on top of the current #window but does not block mouse input to the bottom window. ( I wanted to maintain keyboard input on the #input box however.

I think the best working example would be Google's search box as per my initial post. If you leave an auto-suggest popup open and click around the page, etc. The popup remains open and unaltered. This what I wanted to mimic.

With a regular imgui popup the input below the popup gets blocked. I wanted my #popup to stay up as long as I wanted and I wanted it to be able to take mouse input and not block mouse input of the underlying window. So if I selected text, or clicked a button, etc. on the main #window, the #popup would be unaffected and still be drawn on top.

I managed to fake that by having the popup be a regular window and using the ImGuiWindowFlags_NoBringToFrontOnFocus flag on the main window as mentioned above.

It went something like this:

ImGuiWindowFlags winFlags = ImGuiWindowFlags_MenuBar;

if( isPopupVisible )
    winFlags |= ImGuiWindowFlags_NoBringToFrontOnFocus;

if( !ImGui::Begin( "Developer Console", &isWinOpen, winFlags ) )
{
    ImGui::End();
    return;
}

// Draw arbitrary stuff...

// Done drawing window
ImGui::End();

// Draw the popup as a new regular window on top of the last one
if( isPopupVisible )
{
    // Draw popup window
    ImGuiWindowFlags popupFlags = 
        ImGuiWindowFlags_NoTitleBar          | 
        ImGuiWindowFlags_NoResize            |
        ImGuiWindowFlags_NoMove              |
        ImGuiWindowFlags_HorizontalScrollbar |
        ImGuiWindowFlags_NoSavedSettings     |
        ImGuiWindowFlags_ShowBorders;

    bool isOpenDummy = true;

    ImGui::Begin( "history_popup", &isOpenDummy, popupFlags );
    ImGui::PushAllowKeyboardFocus( false );

    // Draw arbitrary popup content...

    ImGui::PopAllowKeyboardFocus();
    ImGui::End();
}

There was some tricky focus checking stuff I had to do too if I recall, but nothing fancy.

Perhaps the simplest way to facilitate this kind of behavior would be to have some kind of z-layering per root window, allowing each window to have it's own stack of regular windows drawn on top of it (but not intersecting other root windows and their z-layered stack)?

@inflex
Copy link

inflex commented Aug 6, 2016

@harold-b I'm trying to implement the same sort of thing, though I'm fine with it being a popup/window that is located underneath/below the position of the input text field (in fact, that is how I need it).

I can partially get what I want using BeginPopup(), but like your initial attempts the keyboard focus stealing keeps getting in the way.

Do you have a functional outline handy? I've tried to replicate based on your work above without success (right now soon as I press the first key it just closes the modal popup I have where I have my search fields ) and the single character I pressed is all that gets put in to the said field.

Regards,
Paul.

@harold-b
Copy link
Author

harold-b commented Aug 6, 2016

If I recall, there was no way to do it with the regular Popup, because whatever is underneath is simply loses input. This is why I went hunting for workarounds.

If you don't need mouse interaction with the popup, you can use the technique @ocornut presented above which uses the Tooltip instead. You can then listen to the keyboard events on the text input's callbacks and change the current selection on the popup.

If you need mouse interaction with the popup, I'm afraid you're probably stuck the workaround I used with the regular window on top, by using the ImGuiWindowFlags_NoBringToFrontOnFocus flag on the base window while the pseudo-popup is up. If you need it to act like a regular popup you can probably just check if the input lost keyboard focus or the mouse was pressed anywhere outside the input box or the popup.

I'll strip out the bloat from my implementation and post in a few minutes so you can have a functional example.

@inflex
Copy link

inflex commented Aug 6, 2016

Thanks for that @harold-b . Ideally what I'd be trying to do is have the popup of candidates respond to up/down/enter (to select a candidate) or mouseclick, which then collapses the popup giving the main dialog full keyboard control again.

At the moment I'm doing a real "hack job" and simply building a list of small buttons under the field, only downside is that they have no keyboard control (ie, I can't pick a specific one with up/down->enter).

ss

@harold-b
Copy link
Author

harold-b commented Aug 6, 2016

For some reason I'm not getting some events fired on the popup window now in the stripped down version... It's very late here so unfortunately I'm going to have to pause it for tonight. But I can fix it up and post it tomorrow. Please bare with me.

@inflex
Copy link

inflex commented Aug 6, 2016

That's fine, no rush. I'm only looking to improve the usability of things here, it's not 'critical'
Just was happy that there was an issue-thread with similar requirement.

👍

@ocornut ocornut reopened this Aug 6, 2016
@harold-b
Copy link
Author

harold-b commented Aug 6, 2016

@inflex Thanks for your patience.
Here's the gist for the example, I tried to keep it fairly simply:

https://gist.github.com/harold-b/7dcc02557c2b15d76c61fde1186e31d0

@inflex
Copy link

inflex commented Aug 7, 2016

@harold-b simply brilliant, many thanks for that block of code, certainly an item to come in great use with many people I think 👍

@harold-b
Copy link
Author

harold-b commented Aug 7, 2016

My pleasure :)

@rokups
Copy link
Contributor

rokups commented Jan 25, 2020

demo

static char input[32]{""};
ImGui::InputText("##input", input, sizeof(input));
ImGui::SameLine();
static bool isOpen = false;
bool isFocused = ImGui::IsItemFocused();
isOpen |= ImGui::IsItemActive();
if (isOpen)
{
    ImGui::SetNextWindowPos({ImGui::GetItemRectMin().x, ImGui::GetItemRectMax().y});
    ImGui::SetNextWindowSize({ImGui::GetItemRectSize().x, 0});
    if (ImGui::Begin("##popup", &isOpen, ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_Tooltip))
    {
        ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
        isFocused |= ImGui::IsWindowFocused();
        static const char* autocomplete[] = {"cats", "dogs", "rabbits", "turtles"};
        for (int i = 0; i < IM_ARRAYSIZE(autocomplete); i++)
        {
            if (strstr(autocomplete[i], input) == NULL)
                continue;
            if (ImGui::Selectable(autocomplete[i]) || (ImGui::IsItemFocused() && ImGui::IsKeyPressedMap(ImGuiKey_Enter)))
            {
                strcpy(input, autocomplete[i]);
                isOpen = false;
            }
        }
    }
    ImGui::End();
    isOpen &= isFocused;
}

There are still problems:

  • No idea how to avoid static bool isOpen. We want popup to remain open as long as either input or popup itself have focus. However we can not know if popup has focus before rendering it. Can use storage (same as for tree open state) maybe.
  • Keyboard navigation does not work.
  • Not sure how to limit popup height to some max value without making it permanently bigger than needed. Can calculate this from font size and suggestion count.
  • So far i am unable to force window to remain above other windows. Clicking input widget twice moves popup behind active window. Can use ImGui::BringWindowToDisplayFront() for windows rendered in the main viewport and ImGuiWindowFlags_Tooltip when autocomplete is rendered in it's own viewport.

@gallickgunner
Copy link

gallickgunner commented Feb 24, 2020

@ocornut - Are there any plans to have a proper laid out solution for this? The above solutions don't work if you want the same functionality with popups or perhaps I might have missed something. For example in my case, my file dialog is a Popup Modal and an InputText is rendered inside it. I want to show another autocomplete popup like the OP when the user starts typing on the Input Bar but there is no way around it since,

  1. As soon as the popup comes the Input loses focus, If you try to regain focus the Popup closes as intended.

  2. I can't hack my autocomplete popup as an ImGui Window (ImGui::Begin not child) since I'm currently inside a Popup Modal. Opening a Window over the modal by using ImGuiWindowFlags_NoBringToFrontOnFocus on the main Modal window brings the autocomplete Window to the top of the modal but it's not interactable at all since the Popup Modal is supposed to block interaction with windows prolly.

Any other way, you can think of, I can hack to get this working? Here is a picture.

Untitled

  1. I tried using a child window ( ImGui::BeginChild ) for the autocomplete popup. While this does everything I want ( the input doesnt loses focus anymore) there seems to be a transparency issue which doesn't go away even after setting alpha to 1.0 by using ImGuiSetNextWindowBgAlpha()

Untitled

Code:

if(ImGui::BeginPopupModal("Open File", nullptr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse))
{
    // Draw Top and Middle Region ...

    if(show_popup)
    {
        ImGuiWindowFlags popupFlags = ImGuiWindowFlags_NoTitleBar |
                                  ImGuiWindowFlags_NoResize   |
                                  ImGuiWindowFlags_NoMove     |
                                  ImGuiWindowFlags_NoFocusOnAppearing |
                                  ImGuiWindowFlags_NoScrollbar |
                                  ImGuiWindowFlags_NoSavedSettings;

        ImGui::PushClipRect(ImVec2(0,0), ImGui::GetIO().DisplaySize, false);
        ImGui::SetNextWindowBgAlpha(1.0);
        ImGui::SetNextWindowPos(popup_pos);
        ImGui::SetNextWindowSize(popup_sz);
        ImGui::BeginChild("##InputBarComboBox", popup_sz, true, popupFlags);
        
        //Draw List
        /*
        if(ImGui::ListBoxHeader("##InputBarComboBox", ImVec2(0,150))) ....
        */    
        
        ImGui::EndChild();
        ImGui::PopClipRect();
    }
    // Draw Checkbox, Buttons Inside Popup Modal
     ImGui::EndPopup() 
}

@gallickgunner
Copy link

Ok so I managed to solve the issue in 3. Apparently, either I misunderstood how the Z ordering works or there isn't proper support for it as the OP seems to be suggesting that as well.

The issue in 3 happened because I drew the child window first and then drew the bottom checkboxe and buttons in the parent window. I thought the child window should appear on top regardless of "when" it's drawn. Drawing the checkboxes and other things before drawing the child window solved the transparency issue.

@sonoro1234
Copy link

sonoro1234 commented May 3, 2020

I need a Popup that let use mouse input outside it (without closing) because it is a mesh editor that uses parameters from the Popup but also mouse actions done outside the Popup.
Are the tips mentioned in this thread the only way to achieve it?

I think they are not applicable to my use case as I dont want to interactuate with other window but with the whole imgui viewport.

@ocornut
Copy link
Owner

ocornut commented May 3, 2020 via email

@sonoro1234
Copy link

Yes!!

@pixtur
Copy link

pixtur commented Mar 16, 2021

It would be great if this would be a built in component/behavior for drop down lists.

@EricStancliff
Copy link

EricStancliff commented Mar 24, 2021

I spent all day messing with this and I think I finally figured out a hack/workaround that works for me - maybe someone else will benefit. I was unable to use the above "fake" popup implementation because when the item was selected, it would close my parent window, which happened to be a different popup. After much messing around and reading how menus are done,I figured out that if I pass the ImGuiWindowFlags_ChildWindow to the BeginPopup function, everything works as expected!. Here is my code (edited to remove my actual list contents):

    	ImGui::InputText("##searchText", &currentText, flags);

        auto id = ImGui::GetItemID();
        ImVec2 textPos{ ImGui::GetItemRectMin().x, ImGui::GetItemRectMax().y };

        if (ImGui::IsItemActive())
        {
            ImGui::OpenPopup("##SearchBar");
        }
        auto textInputState = ImGui::GetInputTextState((ImGuiID)id);
        if (textInputState)
        {
            ImGui::SetNextWindowPos(textPos, ImGuiCond_Always);
            if (ImGui::BeginPopup("##SearchBar", ImGuiWindowFlags_ChildWindow))
            {
                ImGui::PushAllowKeyboardFocus(false);

                int numHints = 0;
                std::string inputStr;
                inputStr.resize(textInputState->TextW.size());

                ImTextStrToUtf8(inputStr.data(), (int)inputStr.size(), textInputState->TextW.Data, textInputState->TextW.Data + textInputState->TextW.Size);
                inputStr.resize((size_t)textInputState->CurLenW);

                for (auto&& option : optionList)
                {
                    if (nameContainsPhrase(option, inputStr))
                    {
                        if (ImGui::Selectable(option.c_str()))
                        {
                            output = option;
                            edited = true;
                        }
                        ++numHints;
                    }
                    if (numHints > 10)
                    {
                        ImGui::Text("...");
                        break;
                    }
                }

                ImGui::PopAllowKeyboardFocus();
                ImGui::EndPopup();
            }
        }

@nukeulater
Copy link

nukeulater commented Jan 17, 2022

I got it working by creating a new flag for the TextInput item, called ImGuiInputTextFlags_DisplaySuggestions, which will create a popup window that subsequently has a new internal flag ImGuiWindowFlags_SuggestionPopup, preventing ClearActiveID() to execute inside ImGui::FocusWindow() like this:

if (window == NULL || !(window->Flags & ImGuiWindowFlags_SuggestionPopup))
{
    if (g.ActiveId != 0 && g.ActiveIdWindow && g.ActiveIdWindow->RootWindow != focus_front_window)
        if (!g.ActiveIdNoClearOnFocusLoss)
            ClearActiveID();
}

And the code at the end of InputTextEx():

    const bool input_text_is_active = ImGui::IsItemActive();

    // create the suggestions popup window
    if (is_displaying_suggestion_popup && input_text_is_active)
    {
        ImGuiID suggestion_menu_id = g.CurrentWindow->GetID("##sugestions");
        bool popup_open = IsPopupOpen(suggestion_menu_id, ImGuiPopupFlags_None);
        if (!popup_open /*there's any things to display*/)
        {
            OpenPopupEx(suggestion_menu_id, 0);
        }

        // set the next popup position to the last caret position
        ImVec2 suggestion_menu_pos = ImGui::GetCursorScreenPos();
        ImGui::SetNextWindowPos(suggestion_menu_pos);

        if (BeginTextInputSuggestionPopup(suggestion_menu_id, 0))
        {
            //TODO: add suggestion implementation
            for (int i = 0; i < 5; i++)
                if (ImGui::Selectable("test completion", true)) {}

            EndPopup();
        }
    }

    IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
    if ((flags & ImGuiInputTextFlags_EnterReturnsTrue) != 0)
        return enter_pressed;
    else
        return value_changed;
}

This allows the popup window to display over the console, without taking the keyboard input away from the text input widget.
I have no idea if this will introduce any bugs, didn't really dig in too deep into ImGui's internals to get a better understanding of how the code works, although I couldn't find any issues so far, at the point of writing this.
If anyone else has any suggestions on how to improve this or potential issues please let me know!

Here is how it looks:
image

@squadack
Copy link

Moving here from duplicate issue #5513.
I’m looking for a way to display an intractable popup, like code completion in regular code editor.
I have tried rokups’ solution, which works nice, but I have two main problems:

  1. I have multiple widgets, where I want to be able to show clickable hints, so static variable doesn’t mix well with that (the same goes for any solutions that require some global state).
  2. Creating window by hand and forcing it to be on top works nice in regular scenario, but putting it inside a modal popup breaks interactabilty.

The big question is - and I know I’m going to sound like an echo in here, but maybe something has emerged since this thread started - is there any Correct™ way to implement this?
If not, are there any plans to add something like “interactive tooltip” as a built-in widget (or any component that could be used for this)?

@ocornut
Copy link
Owner

ocornut commented Sep 16, 2022

I had a better look at this thread today. I'll try to do a recap, with comments and fixes.

  • Some of the idioms used here, namely using a nested Begin() (not a child), as both @harold-b and @rokups solution did, didn't work when used inside a Modal window. This is now fixed with 440f257.

  • @EricStancliff's solution I believe worked back then they posted it in March 2021, but I believe broke in December 2021 because of 1c4066c. This is now fixed again with 1dd964f 66bae60.

  • A non-interactive popup is easy to achieve, by e.g simply using a tooltip.

  • Add mouse and keyboard interaction and it becomes tricky to achieve currently. Focusing steals active id, but even with that disabled, code generally assume that the focused/activated item is in the focused window (g.NavWindow). Then you factor in the need for keyboard navigation. At least for a simple drop down it should be possibly in some case to disable navigation (ImGuiWindowFlags_NoNav) and emulate it manually.

Rokups' suggestion ( #718 (comment) )
It is essentially using a regular Begin() with the ImGuiWindowFlags_Tooltip flag. It's technically ill-defined behavior but gets us most of the way. Some of the property of a tooltip is to always be on top, while not taking focus.
Until today it didn't work when used inside a modal but as mentioned that's fixed now.
One of the issue is if the parent window has a title bar (e.g. a modal) then at the time you click on one of the selectable, you'll see the parent window lose focus in the title bar while clicking, which is a bit displeasing.
Keyboard navigation doesn't work because the suggestion window is never focused.

EricStancliff's suggestion ( #718 (comment) )
Using BeginPopup() + ImGuiWindowFlags_Child. Intuitively this seems even less defined behavior that the earlier solution. But somehow it generally works better now and does make sense (~Child window are over their Parent but don't steal focus when appearing). With the right glue code, you can get it to react to keyboard input, have the popup be closed with Esc, etc.

Here's what a believe is a decent solution based on the later: (reminder: need 1dd964f)

// State
static char input[32]{ "" };

// Code
const bool is_input_text_enter_pressed = ImGui::InputText("##input", input, sizeof(input), ImGuiInputTextFlags_EnterReturnsTrue);
const bool is_input_text_active = ImGui::IsItemActive();
const bool is_input_text_activated = ImGui::IsItemActivated();

if (is_input_text_activated)
    ImGui::OpenPopup("##popup");

{
    ImGui::SetNextWindowPos(ImVec2(ImGui::GetItemRectMin().x, ImGui::GetItemRectMax().y));
    //ImGui::SetNextWindowSize({ ImGui::GetItemRectSize().x, 0 });
    if (ImGui::BeginPopup("##popup", ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_ChildWindow))
    {
        static const char* autocomplete[] = { "cats", "dogs", "rabbits", "turtles" };

        for (int i = 0; i < IM_ARRAYSIZE(autocomplete); i++)
        {
            //if (strstr(autocomplete[i], input) == NULL)
            //    continue;
            if (ImGui::Selectable(autocomplete[i]))
            {
                ImGui::ClearActiveID();
                strcpy(input, autocomplete[i]);
            }
        }

        if (is_input_text_enter_pressed || (!is_input_text_active && !ImGui::IsWindowFocused()))
            ImGui::CloseCurrentPopup();

        ImGui::EndPopup();
    }
}

It's not ideal but seemingly does the job decently. It does work better with ImGuiConfigFlags_NavEnableKeyboard as this allows closing the popup with ESC (but with two presses), so maybe best adding custom code for that now.

  • Enter should validate input and close popup
  • Esc should close popup and clear active id
  • Clicking outside should close popup
  • Up/down should lose text edit and move up/down (may be better handled with _NoNav + manual code for now)

I'll try to massage that, add regression tests for it, and see if some of it can be standardized or demoed.
Working on that made be really want #5606 too..

ocornut added a commit that referenced this issue Sep 16, 2022
…ior (useful for e.g. #718, #4461 and probably other things)

(broken by 1c4066c)
@BanditTech
Copy link

BanditTech commented May 25, 2023

https://github.com/BanditTech/Triggered/blob/4a19bd56fece77f30cd8b2be35965ad12091fb76/DropdownBoxUtility.cs

For anyone who is trying to recreate this solution in C#
YxSLsCEv3Z

@parbo
Copy link

parbo commented May 29, 2023

I have a somewhat related question. How can I make a popup (using any of the methods in #718 (comment)) be positioned where the text cursor currently is? Especially for InputTextMultiLine. Like a completion popup works in text editors. Is there a way to get that info?

@parbo
Copy link

parbo commented May 29, 2023

I managed to hack something together:

    static auto ime_fn = io.SetPlatformImeDataFn;
    static auto *app = spim_app.get();
    io.SetPlatformImeDataFn = [](ImGuiViewport *viewport, ImGuiPlatformImeData *data) {
      app->setInputPos(data->InputPos[0], data->InputPos[1]);
      return ime_fn(viewport, data);
    };

Is there a better way?

@parbo
Copy link

parbo commented May 29, 2023

Is there anyway to intercept the up/down arrow when using InputTextMultiLine? I'm trying to implement an auto-complete popup:
image

It seem like the only key I can use to do stuff is TAB.

@damian-kos
Copy link

#718 (comment)
Following this proposal there is an issue where I run this popup as a child of Begin() with passed bool *p_open. When Popup was activated, and it's parent window is closed by upper_right Close buton, it throws
Assertion failed: window == window->RootWindow, file \...\imgui.cpp, line 7659
However if we activate it and before using Close button x we change focus to any other window on viewport it does not occur.

Anything I can follow to resolve this?

@PapaNaxos
Copy link

PapaNaxos commented Dec 4, 2023

EDIT
Sorry, it looks like this has been address in your recent commit 0860671

Original Comment:

#718 (comment)

Posting to confirm I also have encountered this bug.

If the auto-complete popup is open when you click the 'X' button of the window, you'll get the failed assertion, mentioned by @damian-kos

Here is a minimal reproduction, using 1.90 WIP imgui-docking branch (viewports enabled)

void MinimalBug()
{
    static bool open = true;

    if (!open) return;

    if (ImGui::Begin("Bug Window", &open))
    {
        // State
        static char input[32]{ "" };

        // Code
        const bool is_input_text_enter_pressed = ImGui::InputText("##input", input, sizeof(input), ImGuiInputTextFlags_EnterReturnsTrue);
        const bool is_input_text_active = ImGui::IsItemActive();
        const bool is_input_text_activated = ImGui::IsItemActivated();

        if (is_input_text_activated)
            ImGui::OpenPopup("##popup");

        {
            ImGui::SetNextWindowPos(ImVec2(ImGui::GetItemRectMin().x, ImGui::GetItemRectMax().y));
            //ImGui::SetNextWindowSize({ ImGui::GetItemRectSize().x, 0 });
            if (ImGui::BeginPopup("##popup", ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_ChildWindow))
            {
                static const char* autocomplete[] = { "cats", "dogs", "rabbits", "turtles" };

                for (int i = 0; i < IM_ARRAYSIZE(autocomplete); i++)
                {
                    //if (strstr(autocomplete[i], input) == NULL)
                    //    continue;
                    if (ImGui::Selectable(autocomplete[i]))
                    {
                        ImGui::ClearActiveID();
                        strcpy(input, autocomplete[i]);
                    }
                }

                if (is_input_text_enter_pressed || (!is_input_text_active && !ImGui::IsWindowFocused()))
                    ImGui::CloseCurrentPopup();

                ImGui::EndPopup();
            }
        }
    }
    ImGui::End();
}

@ocornut
Copy link
Owner

ocornut commented Dec 15, 2023

Is there anyway to intercept the up/down arrow when using InputTextMultiLine? [...] It seem like the only key I can use to do stuff is TAB.

You can use ImGuiInputTextFlags_CallbackHistory:
// Callback on pressing Up/Down arrows (for history handling)

Was named this way as I initially envisioned is for history of e.g. a console input.

I'll spend some time now working on this and #2057 and see if I can come up with canonical or out-of-box code.

ocornut added a commit that referenced this issue Feb 7, 2024
Very highly requested feature (#6962, #5219, #3290, #4627, #5054, #3878, #2881, #1506, #1216, #968).
Also useful for interactive completion/selection popups (#2057, #718)
Based on @kudaba PR. Design for Inputtext V2 should make this obsolete.
@ocornut
Copy link
Owner

ocornut commented Dec 12, 2024

I understand this is a recurrent issue for many. Earlier this year I spent some time trying to implement something like this. I haven't finished as providing a public interface is a little tricky, but nevertheless I thought I'd provide some pointers.

image

Opening the popup with:

// Popup
// - use ImGuiWindowFlags_NoFocusOnAppearing to avoid losing active id.
//   without _ChildWindow this would make us stays behind on subsequent reopens.
// - use ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NavFlattened: even though we use _NoNav this makes us share the focus scope,
//   allowing e.g. Shortcut() to work from within the child when parent inputtext is focused.
//   (or if we used normal navigation this would permit request to be handled while InputText is focused)
// - use ImGuiWindowFlags_NoNav and handle keys ourselves (it's currently easier)
ImGuiWindowFlags popup_window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings;
popup_window_flags |= ImGuiWindowFlags_NoFocusOnAppearing;
popup_window_flags |= ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NavFlattened;
popup_window_flags |= ImGuiWindowFlags_NoNav;
if (BeginPopupEx(GetID("SuggestionPopup"), popup_window_flags))

You can use Shortcut(ImGuiKey_XXX, ImGuiInputFlags_RouteOverActive, input_text_id) to read keys over InputText().
Technically the sum of two recent-years change means means we are also very close to removing the CompletionCallback and handling this 100% externally. The only missing thing if we did so is that it would break the undo stack. It'll be my next step to address this.

Below is my (unfinished) experiment, AS-IS. It's been helpful to figure out what to improve.
I do not recommend that you copy/use this code yet, but since older alternatives may be unreliable I'm pushing those details until this is solved better by default.
There's also too much code because I was toying with completion, highlighting.

Interface:

// Item access interface
// Could be straight parameters to InputTextWithCombo() but since we pass this to callbacks its easier this way.
struct ImGuiInputTextWithComboItems
{
    const char* (*ItemGetter)(void* user_data, int idx);
    void*       UserData;
    int         ItemCount;
};

namespace ImGui
{
    IMGUI_API bool  InputTextWithCombo(const char* label, char* buf, size_t buf_size, ImGuiInputTextWithComboItems* items);
}

Implementation

#define IMGUI_DEFINE_MATH_OPERATORS
#include "imgui.h"
#include "imgui_internal.h"

// Popup input with keyboard navigation and completion.
// This is tricky to implement for several reasons:
// - InputText() notoriously makes it difficult to edit contents/state while active
//    - this currently create inconsistency dealing with text depending of whether processing happens inside InputText() callbacks or outside.
//    - there are many good reasons, but this will be improved hopefully this year, as many requests are reliant on big changes in InputText()
//    - I guess however we currently workaround the issues or complexity, this is going to be a good test case for InputText V2.
// - Keyboard navigation doesn't play well with an active item and when it is in another window than the navigated window.
// Additionally:
// - If you dig into possible flags/features for this, it tends to get very deep.
// - We should ideally tend toward a standard API but this is harder to design than for a custom widget.

// Expected controls:
// - Enter should validate input and close popup
// - Escape should close popup, clear active id, possibly revet?
// - Clicking outside should close popup
// - Up/down should lose text edit and move up/down (may be better handled with _NoNav + manual code for now)
// - Tab should perform completion.

// TODO: Possible options:
// - Scrolling.
// - [A] Can validate a value which is not in list? on/off
// - [B] Look: add combo button
// - [B] Suggestion list: could filter instead of highlight (need to maintain indices)
// - Actual manual input on/off: in which case it's not even an InputText?
// - Completion: configurable separators.
// - Completion: trailing blank on completion (for inputs expected to be multi-words).
// - Completion: display completion preview in buffer.
// - Completion: enable/disable when empty?
// - Completion: casing replacement on/off
// - Suggestion list: highlight on/off?
// - We could use the TypingSelect API if there wasn't a visible text edit. Very useful then.
// - Popup auto-open on/off? has incidence on up/down behavior and notably Home/End/PageUp/PageDown

static bool ImCharIsWordSeparator(char c)
{
    return c == ' ' || c == '\t' || c == ',' || c == ';';
}

static const char* ImStrLocateWordEnd(const char* p, const char* buf_end)
{
    while (p < buf_end && !ImCharIsWordSeparator(p[0]))
        p++;
    return p;
}

static const char* ImStrLocateWordStart(const char* p, const char* buf_start)
{
    while (p > buf_start && !ImCharIsWordSeparator(p[-1]))
        p--;
    return p;
}

// FIXME: Now that we have input routing and that InputText() doesn't carry a ImWchar version
// of the buffer, this could be moved outside of the callback. The only missing thing if we
// wrote manually to the buffer is that undo state would be messed.
static int InputTextWithCombo_InputTextCompletionCallback(ImGuiInputTextCallbackData* data)
{
    if (data->EventFlag == ImGuiInputTextFlags_CallbackCompletion)
    {
        // Locate beginning of current word
        const char* word_end = data->Buf + data->CursorPos;
        const char* word_start = ImStrLocateWordStart(word_end, data->Buf);
        if (word_start == word_end)
            return 0;

        // Build a list of candidates
        ImGuiInputTextWithComboItems* items = (ImGuiInputTextWithComboItems*)data->UserData;
        ImVector<const char*> candidates;
        for (int i = 0; i < items->ItemCount; i++)
            if (const char* item_name = items->ItemGetter(items->UserData, i))
                if (ImStrnicmp(item_name, word_start, (int)(word_end - word_start)) == 0)
                    candidates.push_back(item_name);

        if (candidates.Size == 1)
        {
            // Delete the beginning of the word and replace it entirely so we've got nice casing.
            data->DeleteChars((int)(word_start - data->Buf), (int)(word_end - word_start));
            data->InsertChars(data->CursorPos, candidates[0]);
            //data->InsertChars(data->CursorPos, " ");
        }
        else if (candidates.Size > 1)
        {
            // Multiple matches. Complete as much as we can..
            int match_len = (int)(word_end - word_start);
            for (;;)
            {
                int c = 0;
                bool all_candidates_matches = true;
                for (int i = 0; i < candidates.Size && all_candidates_matches; i++)
                    if (i == 0)
                        c = toupper(candidates[i][match_len]);
                    else if (c == 0 || c != toupper(candidates[i][match_len]))
                        all_candidates_matches = false;
                if (!all_candidates_matches)
                    break;
                match_len++;
            }
            IM_ASSERT(match_len > 0);
            data->DeleteChars((int)(word_start - data->Buf), (int)(word_end - word_start));
            data->InsertChars(data->CursorPos, candidates[0], candidates[0] + match_len);
        }
    }
    return 0;
}

bool ImGui::InputTextWithCombo(const char* label, char* buf, size_t buf_size, ImGuiInputTextWithComboItems* items)
{
    ImGuiContext& g = *GImGui;

    // Disable completion when text field is empty
    ImGuiInputTextFlags input_text_flags = buf[0] ? ImGuiInputTextFlags_CallbackCompletion : ImGuiInputTextFlags_None;
    //input_text_flags |= ImGuiInputTextFlags_EnterReturnsTrue;

    InputText(label, buf, buf_size, input_text_flags, InputTextWithCombo_InputTextCompletionCallback, items);
    ImGuiID input_text_id = GetItemID();
    const bool input_text_active = IsItemActive();
    ImGuiInputTextState* input_state = input_text_active ? GetInputTextState(input_text_id) : NULL;

    // Using an external Shortcut() while active would work neatly instead of using CallbackCompletion,
    // now that we have access to ImGuiInputTextState::ReloadUserBufAndMoveToEnd().
    // But would require a little bit of custom text insertion code, for now using CallbackCompletion.
    //if (input_text_active && Shortcut(ImGuiKey_Tab, ImGuiInputFlags_None, input_text_id))
    //    InputTextWithCombo_HandleCompletion();

    // Locate word boundaries for highlight
    const char* word_start = NULL;
    const char* word_end = NULL;
    if (input_state != NULL)
    {
        word_end = ImStrLocateWordEnd(input_state->TextA.Data + input_state->GetCursorPos(), input_state->TextA.Data + input_state->TextLen);
        word_start = ImStrLocateWordStart(word_end, input_state->TextA.Data);
    }

    if (input_text_active)
        OpenPopup("SuggestionPopup", ImGuiPopupFlags_NoReopen);

    // Position and size popup
    SetNextWindowPos(ImVec2(GetItemRectMin().x, GetItemRectMax().y + GetStyle().ItemSpacing.y));
    SetNextWindowSize({ g.LastItemData.NavRect.GetWidth(), 0 }, ImGuiCond_Appearing);

    // Popup
    // - use ImGuiWindowFlags_NoFocusOnAppearing to avoid losing active id.
    //   without _ChildWindow this would make us stays behind on subsequent reopens.
    // - use ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NavFlattened: even though we use _NoNav this makes us share the focus scope,
    //   allowing e.g. Shortcut() to work from within the child when parent inputtext is focused.
    //   (or if we used normal navigation this would permit request to be handled while InputText is focused)
    // - use ImGuiWindowFlags_NoNav and handle keys ourselves (it's currently easier)
    ImGuiWindowFlags popup_window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings;
    popup_window_flags |= ImGuiWindowFlags_NoFocusOnAppearing;
    popup_window_flags |= ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NavFlattened;
    popup_window_flags |= ImGuiWindowFlags_NoNav;
    if (BeginPopupEx(GetID("SuggestionPopup"), popup_window_flags))
    {
        ImGuiWindow* popup_window = g.CurrentWindow;
        const bool popup_is_appearing = IsWindowAppearing();

        const int cursor_idx_prev = GetStateStorage()->GetInt(GetID("CursorIdx"), -1);
        int cursor_idx = cursor_idx_prev;
        if (popup_is_appearing)
            cursor_idx = -1;

        // Custom keyboard navigation
        bool rewrite_buf = false;
        if (Shortcut(ImGuiKey_DownArrow, ImGuiInputFlags_Repeat, input_text_id) && (items->ItemCount > 0))
        {
            cursor_idx = (cursor_idx + 1) % items->ItemCount;
            rewrite_buf = true;
        }
        if (Shortcut(ImGuiKey_UpArrow, ImGuiInputFlags_Repeat, input_text_id) && (items->ItemCount > 0))
        {
            cursor_idx = (cursor_idx - 1 + items->ItemCount) % items->ItemCount;
            rewrite_buf = true;
        }
        if (Shortcut(ImGuiKey_PageUp, 0, input_text_id)) {} // Steal that away from navigation
        if (Shortcut(ImGuiKey_PageDown, 0, input_text_id)) {}
        if (rewrite_buf)
        {
            ImFormatString(buf, buf_size, "%s", items->ItemGetter(items->UserData, cursor_idx));
            if (input_state)
                input_state->ReloadUserBufAndSelectAll();
            else
                ActivateItemByID(input_text_id);
        }

        // Suggestion list
        for (int item_idx = 0; item_idx < items->ItemCount; item_idx++)
        {
            const char* item_name = items->ItemGetter(items->UserData, item_idx);
            const ImVec2 item_pos = popup_window->DC.CursorPos;

            if (popup_is_appearing && strcmp(buf, item_name) == 0)
                cursor_idx = item_idx;

            if (Selectable(item_name, item_idx == cursor_idx))
            {
                ClearActiveID();
                ImFormatString(buf, buf_size, "%s", item_name);
                CloseCurrentPopup();
            }

            // Highlight when matching prefix
            if (input_state && word_end > word_start)
                if (ImStrnicmp(item_name, word_start, word_end - word_start) == 0)
                    popup_window->DrawList->AddRectFilled(item_pos, item_pos + CalcTextSize(word_start, word_end), GetColorU32(ImGuiCol_TextSelectedBg));

#if 0
            // Nav: Replace text on navigation moves
            if (g.NavJustMovedToId == g.LastItemData.ID)
            {
                ImFormatString(buf, buf_size, "%s", item_name);
                if (input_state != NULL)
                    input_state->ReloadUserBufAndSelectAll();
            }
            if (IsWindowAppearing() && strcmp(buf, item_name) == 0)
                SetItemDefaultFocus();
#endif
        }

        // Close popup on deactivation (unless we are mouse-clicking in our popup)
        if (!input_text_active && !IsWindowFocused())
            CloseCurrentPopup();

        // Store cursor
        if (cursor_idx != cursor_idx_prev)
            GetStateStorage()->SetInt(GetID("CursorIdx"), cursor_idx);

        EndPopup();
    }
    return false;
}

@ocornut
Copy link
Owner

ocornut commented Feb 10, 2025

This thread had lots of varying solutions, but I must clarify that there's a much simpler workaround than my code above, which is simply to put the filter inside the combo contents:

Image

if (ImGui::BeginCombo("combo 1", combo_preview_value, flags))
{
    static ImGuiTextFilter filter;
    ImGui::SetNextItemWidth(-FLT_MIN);
    ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_F);
    if (ImGui::InputTextWithHint("##Filter", "Filter (inc,-exc) (Ctrl+F)", filter.InputBuf, IM_ARRAYSIZE(filter.InputBuf)))
        filter.Build();
    if (ImGui::IsWindowAppearing())
        ImGui::SetKeyboardFocusHere(-1);

    for (int n = 0; n < IM_ARRAYSIZE(items); n++)
    {
        const bool is_selected = (item_selected_idx == n);
        if (filter.PassFilter(items[n]))
            if (ImGui::Selectable(items[n], is_selected))
                item_selected_idx = n;
    }
    ImGui::EndCombo();
}

Without input search hint we can even use the ImGuiTextFilter helper function:
Image

if (ImGui::BeginCombo("combo 1", combo_preview_value, flags))
{
    static ImGuiTextFilter filter;
    ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_F);
    filter.Draw("##Filter", -FLT_MIN);
    if (ImGui::IsWindowAppearing())
        ImGui::SetKeyboardFocusHere(-1);

    for (int n = 0; n < IM_ARRAYSIZE(items); n++)
    {
        const bool is_selected = (item_selected_idx == n);
        if (filter.PassFilter(items[n]))
            if (ImGui::Selectable(items[n], is_selected))
                item_selected_idx = n;
    }
    ImGui::EndCombo();
}

LalisaTM added a commit to LalisaTM/imgui that referenced this issue Feb 25, 2025
commit 2db3e9d
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Feb 25 17:11:56 2025 +0100

    Backends: SDL2, SDL3: Use display bounds when SDL_GetDisplayUsableBounds() fails or return a zero size. (ocornut#8415, ocornut#3457)

    Analoguous to aa8e09d for GLFW.

commit 9ab0b66
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Feb 25 15:55:54 2025 +0100

    Backends: fixed comment to state that ImGuiViewport::PlaformHandle is used to store SDL's WindowID, not SDL_Window*. (ocornut#7853)

    Amend 2d99052

commit dd89bb1
Author: ocornut <omarcornut@gmail.com>
Date:   Fri Feb 21 23:51:30 2025 +0100

    Backends: DirectX11: configure swap chain creation for secondary viewports via undocumented ImGui_ImplDX11_SetSwapChainDescs(). (ocornut#5437, ocornut#7607, ocornut#7286, ocornut#2970)

commit 3064e6d
Author: Marius PvW <marius@taniustech.com>
Date:   Fri Feb 21 22:37:51 2025 +0100

    Viewports + Backends: Win32: Fixed setting title bar text when application is compiled without UNICODE. (ocornut#7979, ocornut#5725)

commit 6acdce7
Author: ocornut <omarcornut@gmail.com>
Date:   Fri Feb 21 22:12:53 2025 +0100

    Backends: Win32: use UnregisterClassW() for matching consistency. (ocornut#8423, ocornut#7979)

    Amend 3293ef8

commit 7730601
Merge: 1a7b594 434b771
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 21 19:56:20 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	backends/imgui_impl_glfw.cpp
    #	backends/imgui_impl_glfw.h
    #	backends/imgui_impl_opengl3.cpp
    #	backends/imgui_impl_osx.h
    #	backends/imgui_impl_osx.mm
    #	backends/imgui_impl_sdl2.cpp
    #	backends/imgui_impl_sdl3.cpp
    #	backends/imgui_impl_win32.cpp
    #	imgui.cpp

commit 434b771
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Feb 19 16:49:35 2025 +0100

    Internals: packing ImGuiDataVarInfo + misc renaming + value of ImGuiDataType_Pointer doesn't need to be Count+1

commit 1a7b594
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 21 19:18:31 2025 +0100

    Backends: GLFW/SDL2/SDL3: Update monitors and work areas information every frame, as the later may change regardless of monitor changes. (ocornut#8415)

commit ea59440
Author: David Maas <contact@pathogenstudios.com>
Date:   Fri Feb 21 17:08:16 2025 +0100

    Backends: Win32: WM_SETTINGCHANGE's SPI_SETWORKAREA message also triggers a refresh of monitor list. (ocornut#8415)

commit 1e18a6c
Author: ocornut <omarcornut@gmail.com>
Date:   Fri Feb 21 16:55:35 2025 +0100

    Examples: GLFW+Vulkan: make GLFW_DIR overridable in cmake bit. (ocornut#8419)

commit a6bcbb1
Author: Tygyh <32486062+tygyh@users.noreply.github.com>
Date:   Thu Feb 20 18:07:25 2025 +0100

    Examples: Android: Update kotlin version (ocornut#8409)

commit 6dc376f
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 20 11:54:32 2025 +0100

    ImFontAtlas: added software/drawlist version of ImGuiMouseCursor_Wait/ImGuiMouseCursor_Progress + moved GetMouseCursorTexData() to internals.

commit 85c488e
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 20 11:46:56 2025 +0100

    Hot-fix for broken MouseDrawCursor support for ImGuiMouseCursor_Wait/ImGuiMouseCursor_Progress/ImGuiMouseCursor_NotAllowed.

    Amend 8a35386, eec097f.

commit 05742f9
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Feb 19 10:55:44 2025 +0100

    Tables: share code between TableSetupColumn() and TableLoadSettings(). (ocornut#7934)

commit 8b7b3ce
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Feb 19 10:14:38 2025 +0100

    Tables: fixed an issue where Columns Width state wouldn't be correctly restored when hot-reloading .ini state. (ocornut#7934)

    Amend 7cd31c3
    column->SortDirection initialized setting was wrong in first block but without side-effect, since sorting always stored explicitly in .ini data.

commit eec097f
Author: ocornut <omar@miracleworld.net>
Date:   Tue Feb 18 18:52:08 2025 +0100

    Added ImGuiMouseCursor_Progress mouse cursor 8a35386+ support in SDL2,SDL3,Win32,Allegro5 backends.

    Amend 8a35386

commit 8a35386
Author: ocornut <omar@miracleworld.net>
Date:   Tue Feb 18 18:40:47 2025 +0100

    Added ImGuiMouseCursor_Wait mouse cursor (busy/wait/hourglass shape) + support in SDL2,SDL3,Win32,Allegro5 backends.

commit 8f0411f
Author: ocornut <omar@miracleworld.net>
Date:   Tue Feb 18 18:19:10 2025 +0100

    Backends: OpenGL3: Lazily reinitialize embedded GL loader for when calling backend from e.g. other DLL boundaries. (ocornut#8406)

commit afd659b
Merge: a4ebe3d5 c4a32a1
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 17 11:46:16 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	backends/imgui_impl_sdl2.cpp
    #	backends/imgui_impl_vulkan.cpp

commit c4a32a1
Author: Nico van Bentum <niico0708@gmail.com>
Date:   Thu Feb 13 21:50:12 2025 +0100

    Tabs: fixed middle-button to close not checking hovering, only close button visibility. (ocornut#8399, ocornut#8387)

    Main bug has been here since 54a60aa, but it's only ef7ffaf which made it very visible.

commit 78ec127
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 14 21:39:45 2025 +0100

    ImDrawList: added InitialFringeScale in ImDrawListSharedData. Default to 1.0f.

    This is to allow some DPI mods with less changes. Only the initial value in SetupDrawListSharedData() will need change.

commit 2860d7b
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 14 19:44:35 2025 +0100

    Selectable: Fixed horizontal label alignment with SelectableTextAlign.x > 0 and specifying a selectable size. (ocornut#8338)

    Regression from ed7551c

commit 474305c
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 14 16:15:09 2025 +0100

    ImFont: simpler constructor.

commit ec4cd2c
Author: ocornut <omarcornut@gmail.com>
Date:   Fri Feb 14 12:19:24 2025 +0100

    Backends: Vulkan: Fixed crash with using no prototypes + *BREAKING* Added ApiVersion to ImGui_ImplVulkan_LoadFunctions(). (ocornut#8326, ocornut#8365, ocornut#8400)

commit a4ebe3d
Author: ocornut <omarcornut@gmail.com>
Date:   Fri Feb 14 12:04:05 2025 +0100

    Viewports: Fixed assertion when multi-viewports disabled and no monitor submitted. Reworked 95c4111. (ocornut#8401, ocornut#8393, ocornut#8385)

commit 98c2f6b
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 13 16:19:41 2025 +0100

    Tables, Error Handling: Recovery from invalid index in TableSetColumnIndex(). (ocornut#1651)

commit e1ae7db
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 13 16:03:40 2025 +0100

    Backends: Vulkan: Fixed building with older headers not supporting VK_HEADER_VERSION_COMPLETE. (ocornut#8326, ocornut#8365)

commit 12963f5
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 13 15:49:47 2025 +0100

    Examples: Vulkan: make ApiVersion a little more visible in examples. (ocornut#8326, ocornut#8365)

commit 890ead6
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 13 15:40:49 2025 +0100

    Backends: Vulkan: Added ApiVersion field in ImGui_ImplVulkan_InitInfo. Dynamic rendering path loads "vkCmdBeginRendering/vkCmdEndRendering" without -KHR on API 1.3. (ocornut#8326, ocornut#8365)

commit 95c4111
Author: Gabriel Rodriguez <gabrielrodriguez@mediamolecule.com>
Date:   Wed Feb 12 12:39:44 2025 +0100

    Viewports: default to first monitor is viewport is outside bounds. (ocornut#8393, ocornut#8385)

    Before the assert was introduced in d66f4e5 the viewport would be eventually clamped with ClampWindowPos using g.FallbackMonitor, but code would run temporarly with DpiScale=0.

commit f94a5f0
Author: Rémy Tassoux <contact@rt2.fr>
Date:   Thu Feb 13 14:30:49 2025 +0100

    Docs: Update doc about plutosvg (ocornut#8395)

commit b78cc37
Author: ocornut <omar@miracleworld.net>
Date:   Wed Feb 12 19:27:43 2025 +0100

    Backends: SDL2: Fixed build for versions older than 2.0.14. (ocornut#7660)

commit 71d39a4
Merge: 8679cfa a931fb7
Author: ocornut <omar@miracleworld.net>
Date:   Wed Feb 12 19:17:48 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	backends/imgui_impl_sdl2.cpp
    #	backends/imgui_impl_sdl3.cpp
    #	imgui.cpp
    #	imgui_internal.h

commit a931fb7
Author: ocornut <omar@miracleworld.net>
Date:   Wed Feb 12 19:15:00 2025 +0100

    Fixed static analyzer warning.

    (was harmless as initialized in NewFrame)

commit 7cd31c3
Author: ocornut <omar@miracleworld.net>
Date:   Wed Feb 12 19:08:52 2025 +0100

    Tables: tamed some .ini settings optimizations to more accurately allow overwriting/hot-reloading settings. (ocornut#7934)

commit 7221f5e
Author: ocornut <omar@miracleworld.net>
Date:   Wed Feb 12 19:01:02 2025 +0100

    Styles, Tabs: Fixed ef7ffaf. (ocornut#8387)

commit ef7ffaf
Author: ocornut <omar@miracleworld.net>
Date:   Wed Feb 12 15:46:17 2025 +0100

    Styles, Tabs: (Breaking) Renamed TabMinWidthForCloseButton to TabCloseButtonMinWidthUnselected. Added TabCloseButtonMinWidthSelected. (ocornut#8387)

commit 3d900ed
Author: PuPuHX <654524200@qq.com>
Date:   Tue Feb 11 10:57:47 2025 +0800

    Examples: Win32+DirectX12: Fixed ExampleDescriptorHeapAllocator overflow free index.

    Amend 40b2286.

commit 6916f93
Author: fdsa <14tanks999@gmail.com>
Date:   Tue Feb 11 13:12:55 2025 -0800

    InputText: Allow CTRL+Shift+Z to redo even outside of OSX. (ocornut#8389)

commit 3b2f260
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 10 21:33:49 2025 +0100

    Windows: Fixed an issue where BeginChild() inside a collapsed Begin() wouldn't inherit the SkipItems flag.

    Amend/fix a89f05a (old!)
    Discovered while looking at glyph being processed in WIP branch.

commit 4dc9df6
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 10 19:29:18 2025 +0100

    Tables: fixed an issue where Columns Visible/Hidden state wouldn't be correctly overridden when hot-reloading .ini state. (ocornut#7934)

commit 88cda0c
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 10 12:39:54 2025 +0100

    Fixed minor warning. Added comment.

commit a431e12
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 10 12:09:44 2025 +0100

    Backends: SDL2, SDL3:  Using SDL_OpenURL() in platform_io.Platform_OpenInShellFn handler. (ocornut#7660)

commit a18622c
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 10 12:02:01 2025 +0100

    TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handler to handle UTF-8 regardless of system regional settings. (ocornut#7660)

commit 2206e31
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 10 11:37:55 2025 +0100

    Demo: Combos: demonstrate a very simple way to add a filter to a combo. (ocornut#718)

commit e8ad60c
Author: edenware <52419657+edenoftheware@users.noreply.github.com>
Date:   Fri Feb 7 21:01:46 2025 -0600

    Fix typo (ocornut#8382)

commit 50dbb08
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 7 22:57:15 2025 +0100

    Tables: sneakily honor ImGuiNextWindowDataFlags_HasChildFlags/ImGuiNextWindowDataFlags_HasWindowFlags as a way to facilitate various hacks/workarounds.

commit e368015
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 7 22:56:02 2025 +0100

    Tables: a clipped scrolling table correctly clears SetNextWindowXXX flags. (ocornut#8196)

    Amend 43c51eb

commit e5668b8
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 7 22:48:31 2025 +0100

    Internals: rename ImGuiNextWindowData::Flags to HasFlags for consistency and to reduce mistakes.

commit 8679cfa
Merge: d803476 4982602
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 7 18:27:32 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	backends/imgui_impl_glfw.cpp
    #	backends/imgui_impl_glfw.h
    #	examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj
    #	imgui.cpp

commit 4982602
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 7 18:16:04 2025 +0100

    Windows, Style: Added style.WindowBorderHoverPadding setting to configure inner/outer padding applied to hit-testing of windows borders.

    Amend 3c7177c, 59f3c4f, ae7f833.
    Could be latched inside windows to be multi-dpi friendly, but likely won't matter soon.

commit 914fbcf
Author: ocornut <omar@miracleworld.net>
Date:   Fri Feb 7 16:23:00 2025 +0100

    Fonts: removed unnecessary const qualifier from ImFont::FindGlyph()

    Amend 0bde57c

commit 4f1d380
Author: fdsa <14tanks999@gmail.com>
Date:   Wed Feb 5 18:41:03 2025 -0800

    Fixed tabs and spaces (ocornut#8377)

commit 0625b37
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 6 18:37:32 2025 +0100

    Scrollbar: Rework logic that fades-out scrollbar when it becomes too small.

    Amend 0236bc2

commit cfed18a
Author: ocornut <omar@miracleworld.net>
Date:   Thu Feb 6 12:34:37 2025 +0100

    Add ImFontConfig::GlyphExtraAdvanceX as a replacement for GlyphExtraSpacing.x (ocornut#242)

    Partly restore 1a31e31.

commit 2d20e13
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Feb 4 20:19:57 2025 +0100

    Backends: GLFW: Added comment about io.AddMouseSourceEvent() not being properly called. (ocornut#8374)

commit d803476
Merge: 1820fe5 1a31e31
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 3 18:42:24 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	backends/imgui_impl_metal.mm
    #	imgui.cpp
    #	imgui_internal.h

commit 1a31e31
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 3 17:55:35 2025 +0100

    (Breaking) Fonts: removed ImFontConfig::GlyphExtraSpacing option which seems largely obsolete and unused. (ocornut#242)

commit de962e8
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 3 17:50:12 2025 +0100

    ImFont: remove SetGlyphVisible()

    Which was never marked public. Added by d284a6c. (ocornut#2149, ocornut#515)
    Making room by removing stuff that are inconvenient to implement in our scaling system.
    If you were using this function please post an issue to report it.

commit da0ba9e
Author: PhantomCloak <unalozyurtrooter@hotmail.com>
Date:   Sun Feb 2 19:25:09 2025 +0300

    Backends: WebGPU: add type alias for dawn WGPUProgrammableStageDescriptor -> WGPUComputeState. (ocornut#8369)

commit 5dd8408
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 3 15:11:03 2025 +0100

    InputTextWithHint(): Fixed buffer overflow when user callback modifies the buffer contents in a way that alters hint visibility. (ocornut#8368)

commit 204cebc
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 3 14:21:53 2025 +0100

    Backends: Metal: Fixed a crash on application resources. (ocornut#8367, ocornut#7419) [@anszom]

commit 6265339
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 3 14:01:48 2025 +0100

    Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox(), RadioButton(), Selectable(). (ocornut#8370)

    Item is already made inactive at the time of calling MarkItemEdited().
    Fix a604d4f

commit f820bf7
Author: ocornut <omar@miracleworld.net>
Date:   Mon Feb 3 12:33:40 2025 +0100

    Version 1.91.9 WIP

commit e4db4e4
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 31 19:50:18 2025 +0100

    Internals: renamed GetIOEx() to GetIO(). Added GetPlatformIO() explicit context variant. - OOPS

commit 1820fe5
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 31 19:02:14 2025 +0100

    Comments, minor alignments tweaks.

commit e2a99b5
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 31 18:26:52 2025 +0100

    Internals: renamed GetIOEx() to GetIO(). Added GetPlatformIO() explicit context variant.

commit 11b3a7c
Merge: c2dcc80 dbb5eea
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 31 16:10:20 2025 +0100

    Merge branch 'master' into docking

commit dbb5eea
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 31 15:57:48 2025 +0100

    Version 1.91.8

commit e6c5296
Author: Konstantin Podsvirov <konstantin@podsvirov.pro>
Date:   Fri Jan 31 16:11:33 2025 +0300

    Examples: SDL3: Fix for Emscripten platform (ocornut#8363)

commit ae6cfd3
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 30 14:34:05 2025 +0100

    Tables, Menus: Fixed tables or child windows submitted inside BeginMainMenuBar() being unable to save their settings. (ocornut#8356)

    Amend error handling (fa178f4) to avoid us setting ImGuiWindowFlags_NoSavedSettings on the wrong window.

commit fa178f4
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 30 14:30:14 2025 +0100

    Error Handling: Recovery from missing EndMenuBar() call. (ocornut#1651)

commit c2dcc80
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Jan 30 11:39:52 2025 +0100

    Docking: fixed ImGuiWindowFlags_DockNodeHost/ImGuiWindowFlags_NavFlattened clash introduced by c38c18c just for 1.91.7 (ocornut#8357)

commit 1dc7762
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 29 20:13:22 2025 +0100

    Fixed zealous GCC warning. (ocornut#8355)

    Amend dfd1bc3

commit c0308da
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 29 20:13:22 2025 +0100

    Fixed zealous GCC warning. (ocornut#8355)

    Amend dfd1bc3

commit 0825952
Merge: 75d9965 dabc990
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 29 20:04:45 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	imgui.cpp
    #	imgui_internal.h

commit dabc990
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 29 19:59:41 2025 +0100

    Rename internal id for standardizing naming convention. "##menubar" -> "##MenuBar", "###NavWindowingList" -> "###NavWindowingOverlay"

    "###NavUpdateWindowing" one should have zero side effect on anyone.

commit a711915
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 29 19:07:28 2025 +0100

    EndMainMenuBar doesn't attempt to restore focus when there's an active id. (ocornut#8355)

    I don't have a specific issue in mind but it seems sane to add that test.

commit dfd1bc3
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 29 19:05:18 2025 +0100

    Tables, Menus: Fixed using BeginTable() in menu layer (any menu bar). (ocornut#8355)

commit 4230e98
Author: ocornut <omar@miracleworld.net>
Date:   Tue Jan 28 14:39:00 2025 +0100

    Error Handling, Debug Log: IMGUI_DEBUG_LOG_ERROR() doesn't need the extra variable.

    Amend 2360061

commit ea0da0b
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 27 18:04:44 2025 +0100

    Extracted PushPasswordFont() out of InputText code.

commit 75d9965
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 27 15:48:20 2025 +0100

    Docking: move DockTabItemStatusFlags stuff next to its peers in DC structure.

commit db4e541
Merge: 81dab64 9c4948a
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 27 15:45:26 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	imgui.cpp
    #	imgui_internal.h
    #	imgui_widgets.cpp

commit 9c4948a
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 27 15:41:24 2025 +0100

    TabBar: Internals: added TabItemSpacing(). (ocornut#8349, ocornut#3291)

commit a05d547
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 27 14:39:26 2025 +0100

    Windows: separating WindowItemStatusFlags from ChildItemStatusFlag, because IsItemXXX _after_ BeginChild()>Begin() shouldn't return last status emitted by e.g. EndChild()

    As IsItemXXX() after is specced as returning title bar data we don't want to lock ourselves up from adding them to child window (e.g. MDI idea using windows to host child windows).

commit 134fbe1
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 27 12:39:44 2025 +0100

    Windows: Fixed IsItemXXXX() functions not working on append-version of EndChild(). (ocornut#8350)

    Also made some of the fields accessible after BeginChild() to match Begin() logic.

commit 5a28f18
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 27 12:27:10 2025 +0100

    Fixed parameter names to SetLastItemData() to align with current names.

commit 81dab64
Merge: 355cb58 96e3b14
Author: ocornut <omarcornut@gmail.com>
Date:   Sat Jan 25 01:15:30 2025 +0100

    Merge branch 'master' into docking

commit 96e3b14
Author: ocornut <omarcornut@gmail.com>
Date:   Sat Jan 25 01:14:46 2025 +0100

    Fixed build with IMGUI_ENABLE_FREETYPE (ocornut#8346)

commit afb6e9a
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 20:03:04 2025 +0100

    Fonts: OversampleH auto-selection uses 36 as heuristic for now.

commit 355cb58
Merge: 64e738c 8a1613a
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 19:40:54 2025 +0100

    Merge branch 'master' into docking, incl conflict merge in BeginMenuBar() for ocornut#8267

    # Conflicts:
    #	imgui_widgets.cpp

commit 8a1613a
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 19:27:50 2025 +0100

    Fonts: OversampleH/OversampleV value defaults to 0 for automatic selection.

commit 4211fdc
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 22 15:44:51 2025 +0100

    ImFont: compact comments in header section.

commit 9eafb7b
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 16:54:59 2025 +0100

    ImFont: IndexLookup[] table hold 16-bit values even in ImWchar32 mode.

commit 53244aa
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 15:00:21 2025 +0100

    Amend 9bc5b04 with a shadowed variable warning fix.

commit ed7551c
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 14:59:37 2025 +0100

    Selectable: Fixed horizontal label alignment when combined with using ImGuiSelectableFlags_SpanAllColumns. (ocornut#8338)

commit bbf9578
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 14:43:16 2025 +0100

    Amend 9bc5b04 to avoid using GImGui mid-function.

commit 9bc5b04
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 24 14:39:07 2025 +0100

    Windows, Style: Fixed small rendering issues with menu bar, resize grip and scrollbar when using thick border sizes. (ocornut#8267, ocornut#7887)

    Amend e.g. 742b5f4.

commit 1019934
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 23 11:31:32 2025 +0100

    ImFontAtlas: made calling ClearFonts() call ClearInputData(). (ocornut#8174, ocornut#6556, ocornut#6336, ocornut#4723)

commit 71da34c
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 22 16:56:18 2025 +0100

    Debug Tools: Tweaked font preview + indent "Glyphs" block.

commit 64e738c
Merge: a3802c8 6906ac9
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 22 12:19:09 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	imgui.cpp

commit 6906ac9
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 22 12:12:07 2025 +0100

    ColorEdit, ColorPicker: (Breaking) redesigned how alpha is displayed in the preview square. (ocornut#8335, ocornut#1578, ocornut#346)

    Added ImGuiColorEditFlags_AlphaOpaque, ImGuiColorEditFlags_AlphaNoBg.
    Removed ImGuiColorEditFlags_AlphaPreview.

commit fdca6c0
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 22 11:28:47 2025 +0100

    Inputs: added IsMouseReleasedWithDelay() helper. (ocornut#8337, ocornut#8320)

commit d17e9fc
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 22 10:32:09 2025 +0100

    Backends: SDL_GPU: shallow tweaks + disable anisotropy in sampler. Examples: SDL+Vulkan: Fixed incorrect defines.

commit 3e6bdc2
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 22 10:22:31 2025 +0100

    Examples: SDL3+SDL_GPU: use SDL_GPU_PRESENTMODE_MAILBOX swapchain parameters.

commit a3802c8
Author: David Maas <contact@pathogenstudios.com>
Date:   Wed Jan 22 10:01:40 2025 +0100

    Backends: SDL3: new viewport windows are created with the SDL_WINDOW_HIDDEN flag before calling SDL_ShowWindow(). (ocornut#8328

    Unsure why it was missing from a526ff8

commit bf13442
Author: ocornut <omar@miracleworld.net>
Date:   Tue Jan 21 14:59:29 2025 +0100

    Moved ImGuiColorEditFlags_AlphaPreview/ImGuiColorEditFlags_AlphaPreviewHalf flags. Demo: reorganized some of color edit/picker demo section.

commit 2af26b7
Author: David Maas <contact@pathogenstudios.com>
Date:   Tue Jan 21 14:25:39 2025 +0100

    ColorEdit, ColorPicker: Fixed alpha preview broken in 1.91.7. (ocornut#8336, ocornut#8241). [@PathogenDavid]

    ImAlphaBlendColors() was broken by ImLerp() change. (cd6c83c)

commit 7ae7c90
Author: ocornut <omar@miracleworld.net>
Date:   Tue Jan 21 13:55:44 2025 +0100

    Tabs, Style: reworked selected overline rendering to better accommodate for rounded tabs. (ocornut#8334)

commit 6e94f6c
Merge: 109dd2b e8779a6
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 20 18:04:31 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	backends/imgui_impl_osx.mm
    #	backends/imgui_impl_sdl2.cpp
    #	backends/imgui_impl_sdl3.cpp
    #	imgui.cpp
    #	imgui_internal.h

commit e8779a6
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 20 17:55:09 2025 +0100

    Font: direct AddText()/RenderText() calls don't need to call strlen() if below clipping region.

    Unlikely to meaningful affect anyone but still..

commit 4c2e7bb
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 20 15:24:46 2025 +0100

    Backends: SDL2,SDL3: removed assert preventing using ImGui_ImplSDL2_SetGamepadMode()/ImGui_ImplSDL3_SetGamepadMode() with ImGui_ImplSDL2_GamepadMode_Manual/ImGui_ImplSDL3_GamepadMode_Manual and an empty array. (ocornut#8329)

commit 8b0af7f
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 20 14:30:40 2025 +0100

    Backends: SDL: update comments regarding API stability, regarding SDL_GPU and SDL_Renderer.

commit aa1b4ea
Author: Julian Rachele <julrachele@gmail.com>
Date:   Sun Jan 19 16:30:15 2025 -0500

    Backends: OSX: Remove notification observer when shutting down. (ocornut#8331)

commit aa23f38
Author: Daniel K. O. (dkosmari) <none@none>
Date:   Fri Jan 17 19:18:05 2025 -0300

    Backends: SDL_Renderer2/3: Use endian-dependent RGBA32 texture format, to match SDL_Color. (ocornut#8327)

commit 80c9cd1
Author: ocornut <omar@miracleworld.net>
Date:   Sat Jan 18 16:43:17 2025 +0100

    Font: reduce unnecessary padding in ImFontConfig struct too.

commit d7454de
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 17 18:09:28 2025 +0100

    Font: minor tweak to struct alignment.

commit dd89a37
Author: ocornut <omar@miracleworld.net>
Date:   Fri Jan 17 17:11:22 2025 +0100

    Backends: Vulkan: sharing duplicate code. (ocornut#5446, ocornut#8326)

commit 487d7f9
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 16 22:30:43 2025 +0100

    Font: Internals: make used page maps smaller. Since it's extremely rarely used and for iterations only. ~34->16 bytes with ImWchar32.

commit f2262eb
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 16 19:46:54 2025 +0100

    Windows: latch FontRefSize at time of Begin(), consistent with e.g. TitleBarHeight, and to avoid calling CalcFontSize() on non-current window.

commit b7c27c5
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 16 19:07:09 2025 +0100

    Windows: legacy SetWindowFontScale() is properly inherited by nested child windows. (ocornut#2701, ocornut#8138, ocornut#1018)

commit 4c64ba1
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 16 17:42:00 2025 +0100

    imgui_freetype: fixed issue where glyph advances would incorrectly be snapped to pixels.

commit 0077357
Author: Diego Mateos <diego.mateos@mecalux.com>
Date:   Thu Jan 16 17:10:26 2025 +0100

    Ignore vscode artifacts (ocornut#8324)

commit b4a5d1d
Author: ocornut <omar@miracleworld.net>
Date:   Thu Jan 16 12:42:54 2025 +0100

    Backends: SDLGPU3: Rename GpuDevice->Device. Expose ImGui_ImplSDLGPU3_CreateDeviceObjects(), ImGui_ImplSDLGPU3_DestroyDeviceObjects(). Misc renaming. (ocornut#8163, ocornut#7998, ocornut#7988)

commit 109dd2b
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 17:50:57 2025 +0100

    Backends: Vulkan: VK_SUBOPTIMAL_KHR doesn't skip frame. (ocornut#7831, ocornut#7825)

commit 507cdba
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 17:38:37 2025 +0100

    Backends: Vulkan: vkQueuePresentKHR() returning VK_SUBOPTIMAL_KHR keeps moving forward. (ocornut#7825)

commit 015186a
Merge: b9badb5 0f33d71
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 17:34:17 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	backends/imgui_impl_dx12.cpp
    #	backends/imgui_impl_vulkan.cpp

commit 0f33d71
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 17:25:44 2025 +0100

    Examples: Vulkan: vkAcquireNextImageKHR() and vkQueuePresentKHR() returning VK_SUBOPTIMAL_KHR keeps moving forward. (ocornut#7825, ocornut#7831)

commit b9badb5
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 17:08:04 2025 +0100

    Backends: Vulkan: removed misleading code incrementing frameindex. (ocornut#7834)

    Thanks NostraMagister!

commit 8ebf22d
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 16:10:47 2025 +0100

    Backends: Vulkan: use ImVector<> for simplicity.

commit 6684984
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 15:13:05 2025 +0100

    Examples: DirectX12: Reduced number of frame in flight from 3 to 2 in provided example, to reduce latency.

commit 0e21bde
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 13:58:38 2025 +0100

    Misc shallow merge to reduce diff in other branches.

commit 8a9de84
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 13:47:52 2025 +0100

    FontAtlas: reduced baked IM_DRAWLIST_TEX_LINES_WIDTH_MAX from 63 to 32. (ocornut#3245)

commit 100075f
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 12:05:33 2025 +0100

    Backends: DirectX12: Texture upload use the command queue provided in ImGui_ImplDX12_InitInfo instead of creating its own.

    + minor tweaks to faciliate branch merging.

commit c59a226
Author: ocornut <omar@miracleworld.net>
Date:   Wed Jan 15 11:58:47 2025 +0100

    Version 1.91.8 WIP

commit c0ae325
Merge: d0d571e 5c1d2d1
Author: ocornut <omar@miracleworld.net>
Date:   Tue Jan 14 13:46:39 2025 +0100

    Merge branch 'master' into docking

    # Conflicts:
    #	imgui.cpp

commit 5c1d2d1
Author: ocornut <omar@miracleworld.net>
Date:   Tue Jan 14 13:16:43 2025 +0100

    Version 1.91.7

commit 9f8481a
Author: ocornut <omar@miracleworld.net>
Date:   Tue Jan 14 13:14:50 2025 +0100

    (Breaking) TreeNode: renamed ImGuiTreeNodeFlags_SpanTextWidth to ImGuiTreeNodeFlags_SpanLabelWidth. (ocornut#6937)

commit 21902e2
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 13 19:51:15 2025 +0100

    Backends: SDL_GPU: fixed SDL_GPUViewport initialisation. (ocornut#8163, ocornut#7998, ocornut#7988)

    Probably harmless. Amend 8bbccf7

commit c38c18c
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 13 19:39:57 2025 +0100

    Avoid using 1<<31 for ImGuiWindowFlags_NavFlattened as it seems to confuse some binding generators.

commit c5f6094
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 13 19:18:05 2025 +0100

    Demo: tweak demo for ImGuiTreeNodeFlags_LabelSpanAllColumns. (ocornut#8318, ocornut#3565)

commit 290e402
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 13 18:55:09 2025 +0100

    TreeNode, Tables: added ImGuiTreeNodeFlags_LabelSpanAllColumns. (ocornut#8318, ocornut#3565)

commit 6fb7d44
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 13 16:46:29 2025 +0100

    Backends: SDL2/SDL3: Comments. (ocornut#7672, ocornut#7670)

commit 32cea85
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 13 15:51:39 2025 +0100

    Debug Tools:  Item Picker: Always available in menu. Tweak Demo Debug Options. (ocornut#2673, ocornut#1651)

commit 00f12b9
Author: ocornut <omar@miracleworld.net>
Date:   Mon Jan 13 15:22:45 2025 +0100

    InputText: Fixed not calling CallbackEdit on revert/clear with Escape key. (ocornut#8273) + rework comments.

    Seems like there is no reason to not run that path. Amend ancient 9501cd9, f3ab5e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests