Opened 2 years ago

Closed 18 months ago

#18115 closed defect (fixed)

CallTips could be invisible if shown next to the border of the screen

Reported by: obfuscated Owned by: Vadim Zeitlin <vadim@…>
Priority: normal Milestone:
Component: wxStyledText Version: dev-latest
Keywords: Cc: fuscated@…
Blocked By: Blocking:
Patch: yes

Description

Steps to reproduce:

  1. Open the stc sample
  2. Move the cursor next to the border of the screen
  3. Press ctrl-shift-space

The calltip is not fully visible.

Attachments (2)

0001-Make-it-harder-for-the-calltip-to-be-invisible.patch download (2.0 KB) - added by obfuscated 2 years ago.
Patch with a fix (based on the qt implementation)
0001-Fix-stc-compilation-when-wxDisplay-is-disabled.patch download (1.1 KB) - added by obfuscated 2 years ago.
Fix compilation when wxDisplay is disabled

Download all attachments as: .zip

Change History (9)

Changed 2 years ago by obfuscated

Patch with a fix (based on the qt implementation)

comment:1 Changed 2 years ago by Vadim Zeitlin <vadim@…>

  • Owner set to Vadim Zeitlin <vadim@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 4cdd3001/git-wxWidgets:

Keep wxSTC call tips inside the current display

Make it harder for the calltip to be invisible

  • This required changes to the Window::SetPositionRelative.
  • Use the Qt version as a base.
  • The idea is to confine the window to the boundaries of the display the scintilla control is at the moment of the call.

Closes #18115.

comment:2 Changed 2 years ago by obfuscated

  • Cc fuscated@… added
  • Resolution fixed deleted
  • Status changed from closed to reopened

The original fix broke builds with --disable-display.
The attached patch tries to fix this.

Changed 2 years ago by obfuscated

Fix compilation when wxDisplay is disabled

comment:3 Changed 2 years ago by vadz

I don't think we should do this, most of wxDisplay methods are supposed to be always available, even when wxUSE_DISPLAY==0 (see comment in wx/display.h) and AFAICS this code should already compile fine if we just always include wx/display.h, so I'll do that.

OTOH I think we do need to check for currentDisplay == wxNOT_FOUND in this code, and probably just fall back to the primary display in this case, just as we already do in Window::GetMonitorRect().

comment:4 Changed 2 years ago by obfuscated

  • Cc fuscated@… removed

Do you want me to provide a patch for this?

comment:5 Changed 2 years ago by vadz

I hope to find time to remove this and other #if wxUSE_DISPLAY guards myself soon. Please remind me if it doesn't happen in a week or two.

comment:6 Changed 18 months ago by obfuscated

  • Cc fuscated@… added

Reminding, I guess it didn't happen in a week or two... :)

comment:7 Changed 18 months ago by vadz

  • Resolution set to fixed
  • Status changed from reopened to closed

Actually I think it did happen, i.e. I believe it should compile now with --disable-display too. Please open another ticket (because I almost didn't react at all to this one due to its title) if this is still broken.

Note: See TracTickets for help on using tickets.