Ticket #43 (closed defect: wontfix)

Opened 6 years ago

Last modified 5 years ago

StatusBar (Footer) API

Reported by: mickey@… Owned by: mickey@…
Priority: high Milestone:
Component: openmoko-libs Version: unspecified
Severity: major Keywords:
Cc: buglog@…, rob@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

http://wiki.openmoko.org/wiki/Footer contains a status bar that listens to dbus.
Since the footer is a separate process, it needs to keep track of the current
application and (re)display its status bar contents.

libmokoui needs to offer an API that encapsulates the dbus call used to send a
message to the footer -- similarities to the GtkStatusBar? API would be preferred.

Attachments

client.c (1.1 KB) - added by rob@… 6 years ago.
Client code for reference code
display.c (4.1 KB) - added by rob@… 6 years ago.
Display code for reference code

Change History

comment:1 Changed 6 years ago by mickey@…

  • Severity changed from enhancement to major

comment:2 Changed 6 years ago by jluebbe@…

It sometimes show the title for Task Manager and Dates.

comment:3 Changed 6 years ago by alphaone@…

  • Milestone set to Phase 2
  • blocked set to 341

libmokoui should offer a class with an API similar to GtkStatusBar? (having a
stack of messages, but only one context - the application).
The actual status bar application just offers a way to display a message through
DBus. Then when an application is shown the class takes care of sending the
message on top of the stack to the status bar. Additionally, if the stack is
altered while the application is still active, the class will update the
StatusBar? application.

Nice to have functionality would include a DBus interface per application so the
task manager can poll the current message (i.e. get_current) and show it as the
title of the application.

comment:4 Changed 6 years ago by rob@…

I think that using dbus for this is completely overkill. When you send a message
on the bus every process on the bus is woken up resulting in a context switch.

A much nicer solution I think would be to use X properties to convey this
information. This should give much better performance especially if a lot of
updates are being made (e.g. updating a progress bar.)

I'm going to spend some time today and tomorrow working on this. Another thing
that we could do is allow the process to use xembed (via GtkPlug/GtkSocket?) to
embed a widget of their own choosing.

I know on the desktop the status notification area uses dbus however that needs
to receive messages from processes without an X window, from my understanding of
the purpose of the footer there will always be an X window for the process that
wants to control the panel

comment:5 Changed 6 years ago by rob@…

  • Cc rob@… added

comment:6 Changed 6 years ago by rob@…

Over the weekend I knocked up some reference code showing how we could use X
properties to do this. Basically the strategy is this:

The footer keeps track of the _NET_WINDOW_ACTIVE property that is set by the
window manager on the root window, it uses this to notice when the
active/topmost window changes.

When the window changes is attempts to get the _MOKO_STATUS_MESSAGE property
from the window and also tracks for changes to this property. It uses the
contents of this property for the message.

The net result is that whenever the client of the topmost window changes the
property the other client knows and can fetch it. If the top-most window is
changed to something that does not have this property the old value of the
message is retained (e.g. dialog box.)

I would propose adding the code for setting the property to MokoWindow? so that
all applications can exploit it trivially and even if they don't the property
can be set to an empty value.

Changed 6 years ago by rob@…

Client code for reference code

Changed 6 years ago by rob@…

Display code for reference code

comment:7 Changed 6 years ago by alphaone@…

  • Status changed from new to closed
  • Resolution set to wontfix

There's no footer in our new UI (OM-2007.2), so this bug doesn't apply any more.

comment:8 Changed 5 years ago by anonymous

Milestone Phase 2 deleted

Note: See TracTickets for help on using tickets.