Closed Bug 1751339 Opened 4 years ago Closed 4 years ago

nightly breaks input method window position if title bar is disabled

Categories

(Core :: Widget: Gtk, defect)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox96 --- unaffected
firefox97 --- unaffected
firefox98 --- fixed

People

(Reporter: wengxt, Assigned: rmader)

References

(Regression)

Details

(Keywords: inputmethod, regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

  1. Disable title bar
  2. type with input method

System is X11/KDE.

Actual results:

input method window is shown in the wrong position

Expected results:

input method window is shown in the correct position

2022-01-02-21-36-25-mozilla-central is the last nightly without this problem.
2022-01-03-09-29-29-mozilla-central is the first nightly with this problem.

Component: Untriaged → Widget: Gtk
Keywords: inputmethod
OS: Unspecified → Linux
Product: Firefox → Core

Sorry I was confused by the nightly auto update, the first version that introduce this problem is
https://ftp.mozilla.org/pub/firefox/nightly/2022/01/2022-01-17-21-49-41-mozilla-central/firefox-98.0a1.en-US.linux-x86_64.tar.bz2

Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1747919

With my Gtk knowledge, I think the culprit is caused by this commit:
https://hg.mozilla.org/mozilla-central/rev/1508310c3f8c6df8b3e36a53ccb0b1b3a72ea59c

Right now the observation is that the GdkWindow passed to gtk_im_context_set_client_window is now a destroyed window (gdk_window_is_destroyed() == true).

It might need a refresh to update im context's client window to the new gdk window.

Flags: needinfo?(robert.mader)

(In reply to Weng Xuetian from comment #4)

With my Gtk knowledge, I think the culprit is caused by this commit:
https://hg.mozilla.org/mozilla-central/rev/1508310c3f8c6df8b3e36a53ccb0b1b3a72ea59c

Thanks, can confirm that's the issue. Unfortunately I currently have very limited time to dive deeper into this, thus I'll propose to just revert the commit for now.

Flags: needinfo?(robert.mader)

Switching to gtk_container_[add|remove] not only looked less
elegant but also broke input method window positions. Revert
it for now, until someone has time to dive deeper into the issue.

Assignee: nobody → robert.mader
Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/a076f89f293b Revert "Replace gtk_widget_reparent", r=emilio
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: