Contents of window should be aligned RTL

Bug #367371 reported by Shahar Or
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wine
Fix Released
Medium
wine (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: wine

Dear friends,

As the screen shot shows, the contents of the window should be RTL aligned but they're not.

Many blessings.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: wine 1.0.1-0ubuntu6
ProcEnviron:
 LANG=he_IL.UTF-8
 SHELL=/bin/bash
SourcePackage: wine
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
In , Marcus Meissner (marcus-jet) wrote :

empty comment. shachar, can you try to reproduce and if possible open a new
bug.

Revision history for this message
In , Shachar Shemesh (shachar-shemesh) wrote :

The comment was not present because there is nothing to say beyond the subject
line. If a combo-box has the "RTL" flag set, it should be right aligned in
Hebrew and Arabic supporting environments.

I opened this bug so that I have a "todo" list (that's why it depends on the
BiDi meta bug). I left it "unconfirmed" because I hadn't had a chance to write a
proper test case, or to figure out the exact Windows behaviour.

I really think "unconfirmed" is the right status for it, for the time being.

Shachar

Revision history for this message
In , Tony-lambregts (tony-lambregts) wrote :

What is the status of this bug?

Revision history for this message
In , Shachar Shemesh (shachar-shemesh) wrote :

This bug is still open. I currently have no resources to handle it. If you think
you do have them, you are more than welcome to submit a patch.

Revision history for this message
In , Marcus Meissner (marcus-jet) wrote :

likely still open.

Revision history for this message
In , Speeddymon (speeddymon) wrote :

Just pinging, no response needed as I am sure you developers are going to work
on this *some* day :)

Revision history for this message
In , Winehacker (winehacker) wrote :

This needs a retest

Revision history for this message
In , Vektuz (vektuz) wrote :

Created attachment 9777
Possible reproduction of the bug w/ wine 0.9.51

This is a screenshots of same test windows exe compiled with GCC/mingw.
I will attach the source for the test exe also

Revision history for this message
In , Vektuz (vektuz) wrote :

Created attachment 9778
compact Source code to create a RTL combo box

Hope this helps some. Compiles with mingw under windows
$ gcc -c combotest.c
$ gcc -o combotest combotest.o -mwindows
$ combotest.exe

Revision history for this message
In , Joshua-pedrick (joshua-pedrick) wrote :

Hi, I'm trying to get into wine development and this bug looked like a good start. I had no trouble compiling wine. I'm having some trouble getting the test case to run. Maybe this isn't the right place to post, but the answer might be helpful for others trying to fix this who are new to wine. I can also compile combotest.exe, but I get the following error when I try to run it with wine:
../wine ./combotest
wine: could not load L"H:\\wine\\rtl_combo_test\\combotest.": Bad EXE format for
fixme:advapi:RegisterEventSourceA ((null),"MDM"): stub
fixme:advapi:RegisterEventSourceW (L"",L"MDM"): stub
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0xc0001002,(nil),0x0000,0x00000000,(nil),0x7e0c39d0): stub
fixme:advapi:DeregisterEventSource (0xcafe4242) stub

I use the following commands to build and link:
 gcc -m32 -I ../include -c combotest.c
gcc -m32 -o combotest combotest.o ../libs/wine/libwine.so.1.0 ../dlls/ole32/ole32.dll.so ../dlls/comdlg32/comdlg32.dll.so ../dlls/user32/user32.dll.so ../dlls/winecrt0/libwinecrt0.a ../dlls/kernel32/kernel32.dll.so

I built wine using Fedora Core 8 x86_64, basic ./configure && make depend && make
everything was compiled with the -m32 flag

I also tried to compile this using MSVC and was unable to because "WNDCLASSEX wc;" is somehow illegal.

Revision history for this message
In , Dmitry-baikal (dmitry-baikal) wrote :

You either need to add the test to existing ones in dlls/user32/tests/combo.c,
or compile your test with a cross compiler as a PE exe.

Revision history for this message
In , Shachar Shemesh (shachar-shemesh) wrote :

(In reply to comment #9)
> Hi, I'm trying to get into wine development and this bug looked like a good
> start. I had no trouble compiling wine. I'm having some trouble getting the
> test case to run. Maybe this isn't the right place to post, but the answer
> might be helpful for others trying to fix this who are new to wine.

Nevertheless, I believe it's best to solve this issue through the mailing lists.

(In reply to comment #10)
> You either need to add the test to existing ones in dlls/user32/tests/combo.c

I am not aware that it is possible to perform interactive tests in that area, and I cannot think of a non-interactive way to test whether the problem still exists. If both are correct, this bug is a poor candidate for the automatic tests.

Shachar

Revision history for this message
In , Lei Zhang (thestig-google) wrote :

Created attachment 12292
quick hack for WS_EX_LAYOUTRTL

I haven't looked too much at WS_EX_LAYOUTRTL, but is this the behavior you want from the edit box inside the combo box?

Revision history for this message
In , Austin English (austinenglish) wrote :

Still present in git. Lei's patch fixes it. Someone should add that testcase to the testsuite...

Revision history for this message
In , Austin English (austinenglish) wrote :

Created attachment 16764
compiled testcase

Revision history for this message
In , Austin English (austinenglish) wrote :

Please retest in current git. If still present, update version field to earliest known version of wine that had this bug. Thanks!

Revision history for this message
In , Diaa Sami (diaa.sami) wrote :

I tried the patch on the current git head, it aligns the text properly but the combobox handle should be at the left, not the right, as shown in the image I will attach.
I'm ready to work on this, is there someone else working on it?

Revision history for this message
In , Diaa Sami (diaa.sami) wrote :

Created attachment 19069
How RTL combobox looks on Windows XP

Revision history for this message
In , Diaa Sami (diaa.sami) wrote :

Created attachment 19118
Adds partial RTL support to combobox and listbox

This patch modifies the layout of RTL comboboxes to match that on Windows(see attachment #19069, the button is to the left), as well as RTL listbox(because it's used within comboboxes), along with the alignment patch for the combobox edit, this should look exactly like Windows.

I sent this early version of the patch to let you know I'm working on this, it's not done yet, please have a look and comment.

Revision history for this message
In , Shachar Shemesh (shachar-shemesh) wrote :

In the last "ExtTextOutW" of the patch, you probably want to add ETO_RTLREADING to the flags.

RTL text needs to not only be right aligned, it also need to be marked as an RTL paragraph, or the reordering algorithm gets things catastrophically wrong when mixed languages are used.

Shachar

Revision history for this message
Shahar Or (mightyiam) wrote :
Revision history for this message
Scott Ritchie (scottritchie) wrote :

Hi, there are two upstream bugs here relating to Hebrew RTL input -- I'm not sure which one is affecting you, but they both probably need to be fixed. The first one is linked at the top of the page, the other one is here: http://bugs.winehq.org/show_bug.cgi?id=13092

Changed in wine (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in wine:
status: Unknown → Confirmed
Revision history for this message
Shahar Or (mightyiam) wrote :

Dear Scott,

Thank you. The correct one is http://bugs.winehq.org/show_bug.cgi?id=1236 .

Many blessings.

Shahar Or (mightyiam)
tags: added: rtl
Revision history for this message
In , mr.larch (bunglehead) wrote :

Combos and Listboxes aren't common controls, but belong to user32.

Feel free to open new bugs for comctl32 controls - one for a problem/control.

Revision history for this message
In , Shahar Or (mightyiam) wrote :

Ping?

Revision history for this message
In , Diaa Sami (diaa.sami) wrote :

I'm working on a fix for this, should be done soon.

Revision history for this message
In , Austin English (austinenglish) wrote :

Removing tasklet keyword.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for posting this bug.

Does this issue occur in newest WINE?

Revision history for this message
In , rusivi2 (rusivi2-deactivatedaccount) wrote :

Does this occur in newest WINE?

Changed in wine (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Yaron (sh-yaron) wrote :

Yes it does, I'm working on this issue with the Wine developers

Jack Leigh (leighman)
Changed in wine (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
In , Shahar Or (mightyiam) wrote :

Dear friends,

1.2 still has it using the attached compiled test case.

Revision history for this message
In , Paul-vriens-wine (paul-vriens-wine) wrote :

Created attachment 30752
Screenshot

Revision history for this message
In , Paul-vriens-wine (paul-vriens-wine) wrote :

Current Git gives me a right aligned box (see screenshot)

Revision history for this message
In , Shahar Or (mightyiam) wrote :

Dear ones,

Then this is probably fixed.

Blessings,
Shahar

Changed in wine:
importance: Unknown → Medium
Revision history for this message
In , Austin English (austinenglish) wrote :

Reported fixed.

Changed in wine:
status: Confirmed → Fix Released
Revision history for this message
In , Alexandre Julliard (julliard) wrote :

Closing bugs fixed in 1.3.3.

Revision history for this message
In , Austin English (austinenglish) wrote :

Removing deprecated 'All' OS.

Changed in wine (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.