Opened 18 years ago
Closed 8 years ago
#661 closed bug (fixed)
CannaIM deskbar replicant popup menu not working; replicant handle menu displayed instead.
Reported by: | Owned by: | korli | |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | - General | Version: | R1/Development |
Keywords: | Cc: | bxi07354@…, jackburton | |
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
When installing Canna input method, a replicant is loaded in the Deskbar.
Clicking on this replicant with the mouse should display a popup menu, but in Haiku it doesn't. Instead, the replicant handle menu is displayed.
Was not sure what component this belonged to; feel free to change it if necessary.
Attachments (5)
Change History (31)
comment:1 by , 18 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
comment:3 by , 18 years ago
FYI, several scripts which have to work first :
hey Deskbar get Messenger of Shelf of View Status of Window Deskbar hey Deskbar get Name of Replicant 0 of Shelf of View Status of Window Deskbar hey Deskbar get View of Replicant 0 of Shelf of View Status of Window Deskbar
BTW I think Haiku input_server should be changed to simply query (doesn't work on R5 because the replicant has no name) : hey Deskbar get View of Replicant MethodReplicant of Shelf of View Status of Window Deskbar
comment:4 by , 18 years ago
Resolution: | → fixed |
---|
comment:6 by , 18 years ago
Status: | new → closed |
---|
comment:7 by , 18 years ago
Nice improvements! We are getting close.
As tested on build 17843, CannaIM deskbar popup menu now works, but there two small oddities:
1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty.
2) The replicant handle is still being displayed; it should not.
Should I open separate bug reports for the above?
comment:8 by , 18 years ago
About these oddities, they must be related to our interface kit implementation: the canna method and method replicant were working on R5 last time I tried. Stefano, could you have a look at the menu oddity ?
comment:9 by , 18 years ago
Cc: | added |
---|
comment:10 by , 18 years ago
"1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty."
I'll have a look at this. Might be a bug in BShelf or BDragger.
"2) The replicant handle is still being displayed; it should not."
This could be related to #116.
comment:11 by , 18 years ago
(In reply to comment #6)
"1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty."
BMenu::Archive doesn't do deep.
if (err == B_OK && deep) {
TODO store items and rects
}
comment:12 by , 18 years ago
Popup menu is now working somehow. Weirdly it seems to appear disabled, and I don't know why.
comment:13 by , 18 years ago
The mistake was found by BMenu::InitData(BMessage *data). data->FindBool("_disable", &fEnabled);
BSeparatorItem is not displayed. status_t BSeparatorItem::Archive(BMessage* archive, bool deep) const {
if (!archive->HasString(B_CLASS_FIELD))
- archive->AddString(B_CLASS_FIELD, "BMenuItem");
+ archive->AddString(B_CLASS_FIELD, "BSeparatorItem");
The return value(item) is not necessarily MethodMenuItem*. void MethodReplicant::MouseDown(BPoint point) {
.... BMenuItem *item = fMenu.Go(where, true, true, BRect(where - BPoint(4, 4),
where + BPoint(4, 4)));
if (item && cast_as(item, MethodMenuItem)) {
BMessage msg(IS_SET_METHOD); msg.AddInt32("cookie", ((MethodMenuItem *)item)->Cookie()); ....
comment:14 by , 18 years ago
This was somehow fixed in revision 18071. Is there anything still valid ?
comment:15 by , 18 years ago
barber, I applied the last part of your patch in revision 18093, and even tested it successfully. Thanks a lot!
comment:16 by , 18 years ago
(In reply to comment #6)
"1) For some reason the submenu that should display among other things the About window when Canna is in Japanese mode appears empty."
This was solved by revision 18093. Thank you.
comment:17 by , 18 years ago
Description: | modified (diff) |
---|---|
Platform: | → All |
Resolution: | fixed |
Status: | closed → reopened |
tested again in revision 18880. The menu itself is empty in the deskbar replicant.
comment:18 by , 18 years ago
Cc: | added |
---|
comment:19 by , 18 years ago
Korli, might this change be the culprit ? http://svn.berlios.de/viewcvs/haiku/haiku/trunk/src/kits/interface/View.cpp?rev=18490&r1=18086&r2=18490
AFAIK, we should add the "error" field to the scripting message even if it's B_OK.
comment:20 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
thanks Stefano, indeed it was this change and another. it's now fixed.
comment:21 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hi, I tested hrev49588 (gcc2 / gcc4 hybrid), this bug seems to occur again.
- After installing a input method, input method menu and icon don't appear.
- After restarting the system, draggier & replicant menu appears.
- There is "Deskbar refuses to add method replicant: General system error" in SYSLOG, though I don't know it is related to this bug.
by , 9 years ago
Attachment: | after_installing.png added |
---|
by , 9 years ago
Attachment: | after_restarting.png added |
---|
by , 9 years ago
Attachment: | replicant_menu.png added |
---|
by , 9 years ago
comment:22 by , 9 years ago
kcg369 pointed out it to me. http://kcg369.b.osdn.me/2014/05/20/64-bit-fixes-for-input_server/ This bug was recurrence due to the different types of messaging functions for handling cookie. We need to unify type of the functions (Int32 or Pointer).
I tested the patch for gcc2 and x86_64, it seems to fix menu and icon. But I don't know whether the cookie is int32 or a pointer.
by , 9 years ago
Attachment: | 0001-Revert-64-bit-fixes-for-input_server.patch added |
---|
comment:23 by , 9 years ago
patch: | 0 → 1 |
---|
comment:24 by , 9 years ago
Version: | → R1/Development |
---|
Looking at the full commit (http://cgit.haiku-os.org/haiku/commit/?id=57ab0395ad31761e27ef6d5aa3af68cc3e4d71b2), there are places where we put a pointer there. When using an int32, we only use the low part of the pointer, which can work most of the time, but in rare cases two pointers will have the same low-part and become mixed up.
We have several solutions:
- Use void* as in the original change, and adjust Canna to still work,
- Use int32, and on 64-bit platforms, use an hash map to map the 32-bit cookie back to a 64-bit pointer pointer,
- Use void* on non-gcc2 platforms, keep int32 for gcc2 for binary compatibility, and apps need to take care of the difference depending on the architecture.
I'm not very happy with any of these 3 solutions, however.
This is dependent on message scripting feature. It is being fixed, but could be longer than expected.