Re: looking for help from a GTK/hildon guru

2011-11-02 Thread Kimmo Hämäläinen

Hi,

I found some code lying on my hard drive. I'm not sure if it's 
open-source, so I'm only pasting a portion of it :)  Hope this helps.



GWebEngine *engine;
engine = g_web_new_web_engine_window_with_context(web, NULL, FALSE, 
FALSE);


GtkWindow *main_window;

main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (main_window),
test of embedded mozilla socket);
  GtkWidget *ss = GTK_WIDGET(gtk_socket_new());

  gtk_container_add (GTK_CONTAINER (main_window), GTK_WIDGET(ss));
  gtk_widget_realize (ss);

  gtk_widget_show (ss);
  gtk_widget_show (main_window);

  guint32 hwidget =
g_web_engine_embed_engine_widget_xid (
engine,
TRUE,
GDK_WINDOW_XWINDOW(gdk_window_get_toplevel( 
ss-window ) ),

xid);

gtk_socket_add_id ((GtkSocket *) ss, xid);
gtk_widget_show (ss);


-Kimmo

On 11/02/11 16:20, ext Jonathan Wilson wrote:

I am working on a test program to test out browser-neteal (so you can
talk to the browser daemon and stuff just like the stock web browser,
conversations app etc) and to eventually provide an example people can
use to see how to create a flash app or web page as an application ala
the tutorial application. But its not working, it just displays a blank
black screen until I kill it. And yes there is valid HTML in my test
html file (and it displays fine in the maemo browser)

Can someone with more hildon and GTK skills than I have take a look at
and see if I have made any mistakes with the hildon/GTK stuff?
Source and binary packages from the browser-neteal-dev package I have
been working on
http://www.cncmods.net/files/browser-neteal-dev-0.7.10.1-2+0m5.zip
http://www.cncmods.net/files/browser-neteal-dev_0.7.10.1-2+0m5_all.deb
sample program
http://www.cncmods.net/files/browsertest.c
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: looking for help from a GTK/hildon guru

2011-11-02 Thread Kimmo Hämäläinen

Now I noticed that they are licenced under MPL1.1 so here you are...

On 11/02/11 16:48, ext Kimmo Hämäläinen wrote:

Hi,

I found some code lying on my hard drive. I'm not sure if it's
open-source, so I'm only pasting a portion of it :) Hope this helps.


GWebEngine *engine;
engine = g_web_new_web_engine_window_with_context(web, NULL, FALSE, FALSE);

GtkWindow *main_window;

main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (main_window),
test of embedded mozilla socket);
GtkWidget *ss = GTK_WIDGET(gtk_socket_new());

gtk_container_add (GTK_CONTAINER (main_window), GTK_WIDGET(ss));
gtk_widget_realize (ss);

gtk_widget_show (ss);
gtk_widget_show (main_window);

guint32 hwidget =
g_web_engine_embed_engine_widget_xid (
engine,
TRUE,
GDK_WINDOW_XWINDOW(gdk_window_get_toplevel( ss-window ) ),
xid);

gtk_socket_add_id ((GtkSocket *) ss, xid);
gtk_widget_show (ss);


-Kimmo

On 11/02/11 16:20, ext Jonathan Wilson wrote:

I am working on a test program to test out browser-neteal (so you can
talk to the browser daemon and stuff just like the stock web browser,
conversations app etc) and to eventually provide an example people can
use to see how to create a flash app or web page as an application ala
the tutorial application. But its not working, it just displays a blank
black screen until I kill it. And yes there is valid HTML in my test
html file (and it displays fine in the maemo browser)

Can someone with more hildon and GTK skills than I have take a look at
and see if I have made any mistakes with the hildon/GTK stuff?
Source and binary packages from the browser-neteal-dev package I have
been working on
http://www.cncmods.net/files/browser-neteal-dev-0.7.10.1-2+0m5.zip
http://www.cncmods.net/files/browser-neteal-dev_0.7.10.1-2+0m5_all.deb
sample program
http://www.cncmods.net/files/browsertest.c
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers





neteal.tgz
Description: application/gtar-compressed
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Looking for some help/tutorials on status bar widgets for my Cell Broadcast SMS status bar widget

2011-10-17 Thread Kimmo Hämäläinen

Hi,

If I understand correctly, you are talking about N900.  If that's the 
case, maybe looking at the example code helps:

https://maemo.gitorious.org/fremantle-hildon-desktop/libhildondesktop/trees/master/examples/status-menu

-Kimmo

On 10/17/11 04:14, ext Jonathan Wilson wrote:

I have gotten my Cell Broadcast SMS code finished to the point where it
does everything it should except that it:
1.Writes to a log file instead of updating a status bar widget (i.e. the
log file is written to anytime something happens that would trigger a
change in the status bar widget)
and 2.Doesn't handle anything other than the location messages on
channel 50 (mostly
because I cant find any information on how to handle those messages or
what they are for and because I dont know how to handle multi-page CBS
messages)

I am looking for someone who can help me build a status bar widget to
display the location information. I understand some of how to program in
QT but GTK (which is what you are supposed to use to write status bar
widgets) is totally alien to me.

The widget I want to build would basically be similar to the
(unfortunatly closed source) connui-home-cellular widget (which displays
the operator name)

Help with parsing and displaying the other non-location messages would
be nice too if anyone knows how to do that.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to attach gdb to hildon-desktop?

2011-07-14 Thread Kimmo Hämäläinen

On 07/14/11 02:35, ext Jonathan Wilson wrote:

Can anyone tell me how I can attach gdb to hildon-desktop (on the phone,
not in the SDK environment) so I can debug a status bar widget?


You probably mean hildon-status-menu because hildon-desktop does not 
have any plugins.


My memory is failing me, but I think that you need to use dsmetool (or 
similar) to stop the hildon-status-menu first (so that it's not 
automatically restarted), and then install the debug symbols and run 
gdb hildon-status-menu in ssh session.


-kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Qt application crashes after 2 minutes if started from app grid

2011-05-09 Thread Kimmo Hämäläinen

On 05/09/11 17:37, ext Cornelius Hald wrote:

Brilliant :) Already runs for 6:30 minutes without crashing. Do I still
need the .service file or can I delete it as well?


There is a reason why all applications register a D-Bus service: that 
way we can guarantee that only one copy of the application is running 
(this is also used in MeeGo). Also, if the application is already 
running, it can receive the D-Bus message and raise its window.


If you don't use D-Bus at all, you need to implement this 
single-instance and window raising yourself.


-Kimmo



Thanks a lot!
Conny

P.S. Added the list again.

On Mon, 2011-05-09 at 16:27 +0200, th.p...@gmail.com wrote:

Hi,

Have you tried removing the osso service line/d-bus information in the
application's .desktop file? I think that fixed the problem. There
should be something about that in the mailing list archives IIRC.

HTH :)
Thomas




__
On May 9, 2011 4:05 PM, Cornelius Haldh...@icandy.de  wrote:
Hi all!

I've got a bit a weird problem. I'd we happy if anyone could give me
a
hint.

My Qt (QML/C++) app terminates after exactly 2 minutes if it was
started
via the graphical launcher. If I start it from the terminal it runs
fine
for hours. I think this could be connected with D-Bus, but I'm not
sure
how/where to look.

In Gtk+ apps we had to register with D-Bus after start-up. If we
didn't
do so, the app was killed after some time. I thought with Qt that
QApplication takes care of this. Is this true, or do I have to
register
manually?

Thanks!
Conny


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Disable system click for an application?

2011-03-24 Thread Kimmo Hämäläinen

On 03/23/11 23:27, ext Tarantism wrote:

On Wed, 2011-03-23 at 10:31 +0200, Kimmo Hämäläinen wrote:

On 03/23/11 00:30, ext Tarantism wrote:

I'd like to disable the system touch screen click for my application.

The best way depends on your application.  Do you use GTK/Qt/pure-X or what?

I'm using Qt.


In GTK, you could create a widget and call gtk_grab_add() for it
to catch all mouse events (including taps on the screen).


Following your suggestion, I've tried calling the event accept method in
the relevant mousePressEvent handler and also in the MainWindow widget
handler but I still get clicks. Any clues?


Implement QApplication::x11EventFilter():
http://doc.qt.nokia.com/4.6/qapplication.html#x11EventFilter

and return true for ButtonPress/ButtonRelease/MotionNotify. 
x11EventFilter is called before Qt's own handling of the event, and 
returning true for an event skips Qt's own handling for it.


-Kimmo



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Disable system click for an application?

2011-03-23 Thread Kimmo Hämäläinen

On 03/23/11 00:30, ext Tarantism wrote:

I'd like to disable the system touch screen click for my application.
Can this be done?


The best way depends on your application.  Do you use GTK/Qt/pure-X or what?

In GTK, you could create a widget and call gtk_grab_add() for it to 
catch all mouse events (including taps on the screen).


-Kimmo


Thanks.

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Suspended process

2010-07-02 Thread Kimmo Hämäläinen
On Thu, 2010-07-01 at 21:54 +0200, ext Demetris wrote:
 Hi all,
 
 the same (shell-based) app running on N810 under Maemo5 gets suspended on
 the N900 under Maemo5. Any idea why it would be so - I am running cvm
 (J2ME-CDC PhoneME for java runtime):
 
 Process #1667 received signal 4, suspending
 [1] + Stopped (signal)   /home/user/dgg/cdc/bin/cvm
 
 If I keep typing fg to bring the job to the foreground, it executes a 
 few more statements
 and then it gets suspended again. Anyone else has seen this behavior?

Signal 4 seems to be Illegal instruction. This probably means that you
need to recompile it for N900, due to the different processor.

-Kimmo

 
 Thanks very much
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: osso_initialize: how to make it work?

2010-06-08 Thread Kimmo Hämäläinen
On Mon, 2010-06-07 at 22:26 +0200, ext maemo.me...@spamgourmet.com
wrote:
 OK, it's the run-standalone.sh thing.  I remember now, that was a 
 constant irritation when I was trying to fix bugs in Modest.  I never 
 fully understood it.  Is that thing documented anywhere, is there any 
 in-depth discussion of why it's necessary and how to use it?  It really 
 makes every step in the development process very painful.

libosso connects to both D-Bus daemons: the system and session bus.
run-standalone.sh just defines the environment variable so that it knows
how to connect to the D-Bus session bus (there could be many of them).
You don't need that script when you develop in the device (environment
is defined there at login time).  Just ask if you have questions, I
happen to know something about the horrible libosso :)

-Kimmo

 
 By the way, osso_initialize seems to work just fine without either 
 gtk_init or hildon_init.  But no doubt failing to initialise one of 
 those will cause various kinds of hell later on.  Is this dependency 
 documented anywhere?
 
 On 07/06/10 21:05, Faheem Pervez - tripp...@gmail.com wrote:
  OSSO == Open Source Software Operations (which is funny and now
  defunct, but I won't go into it here).
 
  If you're running on the device, make sure you're running as user and
  not root (or at least using run-standalone.sh).
 
  If you're running in Scratchbox, make sure to af-sb-init.sh start
  and run the program using run-standalone.sh
 
  Oh, note that some aspects of libosso will require a GLib mainloop,
  whilst others require GTK+ to be initialized, as in Mr. Ivanov's reply
  (osso_cp_plugin_execute () springs to mind).
  On 6/7/10, maemo.me...@spamgourmet.commaemo.me...@spamgourmet.com  wrote:
  I've been scouring the documentation on maemo.org and getting pretty
  frustrated.  Almost none of it is up to date, and almost none of it is
  relevant to a beginning developer.  So:
 
  Here is my code:
 
  #includestdio.h
  #includelibosso.h
 
  int main(int argc, char* argv[])
  {
osso_context_t* osso;
 
osso = osso_initialize(name.exon.mapcacher, 20100529, TRUE,  
  NULL);
if (!osso)
{
printf(Failed to initialise osso\n);
return 1;
}
 
return 0;
  }
 
  Here is the output:
 
  Failed to initialise osso
 
  Why?
 
  Also, what does osso mean?  Years of using Maemo, I've never figured
  that out.
 
  Is there any genuine getting started tutorial showing how to write a
  program that actually works in Maemo?  Is there a hello world
  application that's less than a hundred lines, with an explanation of
  what all those lines are for?
 
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 
 
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Kimmo Hämäläinen
On Tue, 2010-06-08 at 15:43 +0200, ext Daniil Ivanov wrote:
 Hi Kimmo!
 
 It sets in case Qt::WA_Maemo5PortraitOrientation true
  Qt::WA_Maemo5LandscapeOrientation false
 _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
 _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 1

What about in the case that you have only
Qt::WA_Maemo5LandscapeOrientation set?

 I just wonder what will happen if to set
 _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
 _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 0
 for rest of two cases?

I think SUPPORT=1  REQUEST=0 is the same as rotate automatically
nowadays.

-Kimmo

 
 Thanks, Daniil.
 
 2010/6/8 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
  Hi,
 
 
  In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
  the main.cpp. The auto orientation works fine. However, I have some
  stacked windows that I want to display only in landscape. I've tried
  using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
  creating the window or in the window it self, but it doesn't seem to
  have any effect. How can I force some of the windows to be only
  landscape?
 
  Could you check what xprop (in x11-utils package) shows about the window
  after setting this Qt::WA_Maemo5LandscapeOrientation?
 
  -Kimmo
 
 
 
 
 
  Cheers,
 
 
  Sascha
 
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Kimmo Hämäläinen
On Tue, 2010-06-08 at 16:05 +0200, ext Daniil Ivanov wrote:
 Hi Kimmo!
 
 2010/6/8 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  On Tue, 2010-06-08 at 15:43 +0200, ext Daniil Ivanov wrote:
  Hi Kimmo!
 
  It sets in case Qt::WA_Maemo5PortraitOrientation true
   Qt::WA_Maemo5LandscapeOrientation false
  _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
  _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 1
 
  What about in the case that you have only
  Qt::WA_Maemo5LandscapeOrientation set?
 
 If it's set to true, then no properties and if to false it will be as above.

Sounds like hildon-desktop bug then. No properties should mean only
landscape.

-Kimmo

 
 ~Daniil
 
  I just wonder what will happen if to set
  _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
  _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 0
  for rest of two cases?
 
  I think SUPPORT=1  REQUEST=0 is the same as rotate automatically
  nowadays.
 
  -Kimmo
 
 
  Thanks, Daniil.
 
  2010/6/8 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
   On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
   Hi,
  
  
   In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
   the main.cpp. The auto orientation works fine. However, I have some
   stacked windows that I want to display only in landscape. I've tried
   using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
   creating the window or in the window it self, but it doesn't seem to
   have any effect. How can I force some of the windows to be only
   landscape?
  
   Could you check what xprop (in x11-utils package) shows about the window
   after setting this Qt::WA_Maemo5LandscapeOrientation?
  
   -Kimmo
  
  
  
  
  
   Cheers,
  
  
   Sascha
  
   ___
   maemo-developers mailing list
   maemo-developers@maemo.org
   https://lists.maemo.org/mailman/listinfo/maemo-developers
  
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: Qt Autorotation

2010-06-03 Thread Kimmo Hämäläinen
On Thu, 2010-06-03 at 00:39 +0200, ext Felipe Crochik wrote:
 Hi, 
 
 It seems to me that this is an unintended positive side effect instead of
 a planned requirement. I pass the mainwindow pointer to my dialog
 constructors and this should set the parent.
 
 By reading the documentation setParent should be quite useless in this
 scenario because I would be changing the parent to the exact same one
 assigned previously. I believe it just happens to work because setParent
 will hide the just created dialog and then when you call exec or show it
 will probably trigger the window manager recognizing this window as part
 of an autorotation application and adjusting it accordingly.

Yes, the WM makes sure that transient dialogs inherit portrait
properties from the parent (meaning the window they are transient for).
Of course, you could also put the window properties to the dialog window
itself to have the same effect with a system-modal (non-transient)
dialog.

-Kimmo

 
 Regardless, it was a good catch. It will probably help saving a bunch of
 useless lines of code trying to remedy this issue and hopefully on a new
 release it will be fixed so we don't need to artificially reset the parent
 to make the manager adjust the window.
 
 I would say that it is probably worth reporting this as a bug on the
 qt/nokia web site. Have you reported it?
 
 Thanks for updating us on your findings
 Felipe
 
 -Original Message-
 From: Stefanos Harhalakis [mailto:v...@v13.gr] 
 Sent: Wednesday, June 02, 2010 6:08 PM
 To: Felipe Crochik
 Cc: maemo-developers@maemo.org; Luca Donaggio
 Subject: Re: Qt Autorotation
 
 Hello,
 
 On Thursday 27 of May 2010, Felipe Crochik wrote:
  Luca,
  I ran into the same issue - the new windows always start on landscape -
 and
  used the same workaround - checked the screen resolution and when taller
  set the portrait attribute. And yes, I believe you are right, setting the
 
 I had the same problem but it proved to be my fault. If you are using
 QDialogs 
 like me then you only have to be sure that you're setting the main window
 (the 
 one with the portrait mode support) as the parent window. This will give
 nice 
 portrait support and QDialogs will start in the proper condition.
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Qt Autorotation

2010-06-03 Thread Kimmo Hämäläinen
On Thu, 2010-06-03 at 14:47 +0200, ext Stefanos Harhalakis wrote:
 Hello,
 
 On Thursday 03 of June 2010, Kimmo Hämäläinen wrote:
  Yes, the WM makes sure that transient dialogs inherit portrait
  properties from the parent (meaning the window they are transient for).
  Of course, you could also put the window properties to the dialog window
  itself to have the same effect with a system-modal (non-transient)
  dialog.
 
 I believe you misunderstood the problem:
 
 The original problem was that new windows would not respect the current 
 state. 
 If you create a new dialog and set it to auto-rotate, the new dialog will 
 show 

Do you set the rotation property before showing the dialog or after?  If
you set it before showing it, it sounds like hildon-desktop bug then...

 up in landscape mode even if the display was in portrait mode. It is a common 
 problem that affects pop-up dialogs.
 
 It can be bypassed by setting a parent window and Felipe explained why.

There should not be a difference. If there is, it's a bug...

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Kimmo Hämäläinen
Hello!

The PR1.2 has a super-secret, unplanned feature that we smuggled in:
so-called live backgrounds support in hildon-desktop (= 1:2.2.133-1).
Live background is a window that is displayed below or front of the Home
applets, either in a specific desktop view (panning with the view) or as
common for all views (static).

Live background window is recognised when an integer-valued
_HILDON_LIVE_DESKTOP_BACKGROUND window property is found in the window:

0this client is not a live background
1-4  home view specific live background
101-104  home view specific live foreground (above applets)
-1   global live background used for all home views
-101 global live foreground used for all home views

Notice that you probably want to use a transparent window for live
foregrounds so that the applets and the background image are still
visible.  What you also want (I tell you) is to pause the animation of
the background when it's not visible.  I have ported xsnow for
demonstrating how to do the pausing and detect positions of the Home
applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also
trying to create a Garage project for it). The xsnow pausing is not
optimal (it periodically wakes up to check sysfs for the display
brightness), but it has not eaten all my battery even if I let it run
overnight.

Someone could write a Control Panel plugin for managing live backgrounds
(these window properties), since there is no tool as yet.

There is a basic code example / test program here:
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/tests/test-live-bg.c

-Kimmo



xsnow_1.42-8maemo1.diff.gz
Description: GNU Zip compressed data
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Kimmo Hämäläinen
On Tue, 2010-06-01 at 10:41 +0200, ext Sivan Greenberg wrote:
 That is very cool Kimmo!
 
 I have a life improving app use case for that, I'll be sure to check
 you examples.
 
 The manager has to be written in C/GTK or can be eased off in PyGtk ?

I think the Control Panel plugin API is C/GTK only since the plugin runs
inside the Control Panel application.  You'd need to be somehow familiar
with X11 programming, since it would involve finding out the current
live backgrounds and offer UI for manipulating the window property on
them.  Actually it's possible to put any application as the live
background, and it could even work if the application only depends on
ButtonPress, ButtonRelease and Motion events (which are forwarded by
hildon-desktop to the live background window).

-Kimmo

 
 Sivan
 
 2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  Hello!
 
  The PR1.2 has a super-secret, unplanned feature that we smuggled in:
  so-called live backgrounds support in hildon-desktop (= 1:2.2.133-1).
  Live background is a window that is displayed below or front of the Home
  applets, either in a specific desktop view (panning with the view) or as
  common for all views (static).
 
  Live background window is recognised when an integer-valued
  _HILDON_LIVE_DESKTOP_BACKGROUND window property is found in the window:
 
  0this client is not a live background
  1-4  home view specific live background
  101-104  home view specific live foreground (above applets)
  -1   global live background used for all home views
  -101 global live foreground used for all home views
 
  Notice that you probably want to use a transparent window for live
  foregrounds so that the applets and the background image are still
  visible.  What you also want (I tell you) is to pause the animation of
  the background when it's not visible.  I have ported xsnow for
  demonstrating how to do the pausing and detect positions of the Home
  applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also
  trying to create a Garage project for it). The xsnow pausing is not
  optimal (it periodically wakes up to check sysfs for the display
  brightness), but it has not eaten all my battery even if I let it run
  overnight.
 
  Someone could write a Control Panel plugin for managing live backgrounds
  (these window properties), since there is no tool as yet.
 
  There is a basic code example / test program here:
  http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/tests/test-live-bg.c
 
  -Kimmo
 
 
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Kimmo Hämäläinen
On Tue, 2010-06-01 at 11:32 +0200, ext Sivan Greenberg wrote:
 2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  I think the Control Panel plugin API is C/GTK only since the plugin runs
  inside the Control Panel application.  You'd need to be somehow familiar
  with X11 programming, since it would involve finding out the current
  live backgrounds and offer UI for manipulating the window property on
 
 So essentially find the XWindow ID and set transparency attribute on it?

No, transparency property is not used, the window itself needs to be
transparent (i.e. 32-bit window with alpha channel). You'd need to use
XQueryTree() (check e.g. the xsnow patch -- it finds the applet windows)
and find windows with _HILDON_LIVE_DESKTOP_BACKGROUND  0 window
property on them, and then provide UI for manipulating the property, and
perhaps even killing the processes (when _NET_WM_PID is provided by the
window). See test-live-bg.c for example code on how to set this
property.

-Kimmo

 
 Sivan

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


xsnow (Re: Live Backgrounds in PR1.2 hildon-desktop)

2010-06-01 Thread Kimmo Hämäläinen
On Tue, 2010-06-01 at 09:33 +0200, Hamalainen Kimmo (Nokia-D/Helsinki)
wrote:
...
 the background when it's not visible.  I have ported xsnow for
 demonstrating how to do the pausing and detect positions of the Home
 applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also

Maybe it's not Christmas season yet but xsnow is now available from
extras-devel. ;)

Notice that you need to kill it from the terminal, it does not have any
quit button on it, and that it goes on your current desktop (make sure
you have some applets on it).

The PR1.2 version of hildon-desktop still has some bugs related to the
live background feature. Those are fixed in the git master and should be
in the next SW update also. But it is usable, just may need some
workarounds.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Quality assurance of stable software: my battery drained in few hours

2010-05-31 Thread Kimmo Hämäläinen
On Sun, 2010-05-30 at 10:30 +0200, ext Sivan Greenberg wrote:
 Stuck could be deduced for example when the process is in more then
 90% CPU for more than a threshold duration that we will  predetermine
 and being idle on its I/O streams.

But that would prevent running s...@home ;)  Browser could easily take
90% CPU in a legal case when flash is involved.

-Kimmo

 
 Sivan
 
 On Sun, May 30, 2010 at 11:24 AM, Daniil Ivanov daniil.iva...@gmail.com 
 wrote:
  Hi Sivian!
 
   How do you define the stuck? It's Ok for the process to consume 90%
  of CPU time for short
   period of time.
 
  Thanks, Daniil.
 
  On Sun, May 30, 2010 at 11:20 AM, Sivan Greenberg si...@omniqueue.com 
  wrote:
  Hey Daniil,
 
   If a process is stuck in and awakened , and consumes more then a
  $PERDEFINED % of cpu, and it's output and input streams are idle, then
  I'd say we need to seriously consider killing it.
 
  Sivan
 
  On Sun, May 30, 2010 at 11:07 AM, Daniil Ivanov daniil.iva...@gmail.com 
  wrote:
  Hi Silvan!
 
   In these terms GPS and WiFi are also maligant. How kernel or
  anything else could
   know what is reasonable power consumption for a process?
 
  Thanks, Daniil.
 
  On Sat, May 29, 2010 at 10:49 PM, Sivan Greenberg si...@omniqueue.com 
  wrote:
  Actually, I would think the kernel should already do something like 
  that...
 
  On Sat, May 29, 2010 at 10:48 PM, Sivan Greenberg si...@omniqueue.com 
  wrote:
  Doesn't the userland carry some sort of process monitoring, killing
  malignant processes ? If not, we should develop something like this
  for MeeGo.
 
  Sivan
 
  On Sat, May 29, 2010 at 10:44 PM, Aniello Del Sorbo ani...@gmail.com 
  wrote:
  On 29 May 2010 10:03, Andrea Grandi a.gra...@gmail.com wrote:
 
  Hi,
 
  On 29 May 2010 19:02, Ian v...@riseup.net wrote:
   Hi
  
   I went to sleep at 3:00, I wake up few minutes ago with the N900
   powered off. There was not any active connection when I went to 
   sleep,
   so could anyone please explain me WHO drained my whole battery?!
  
   Bluetooth? I'd check that
 
  I never use it
 
 
  Is this a freshly flashed N900?
  Or did you restore from a backup?
  I had mine died yesterday in half a day because a process (I think
  intellisync or something like that) was stuck somehow somewhere.
  I have mine from a restored backup. Sure I wanted it to be stable 
  after a
  restore, but sometimes old config files/settings/whatever cause 
  unexpected
  (quite impossible to catch in testing) behaviors.
  --
  anidel
 
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 
 
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 
 
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Getting the running Processes information In maemo

2010-05-18 Thread Kimmo Hämäläinen
On Tue, 2010-05-18 at 08:41 +0200, ext sandeep kodimela wrote:
 Hi all,
 I want to get the list of running processes as well as Running applications 
 from the phone.
 Can anybody suggest where do i start?
 Thanks in advance

For getting list of applications (application windows), see the e-mail

   Subject: 
Re: Displaying the information of
the MMC card and the phone memory
  Date: 
Wed, 12 May 2010 14:43:57 +0200
(15:43 EEST)

on this mailing list. Hildon-desktop uses a similar approach.

-Kimo

 
 Regards
 Sandeep  
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Displaying the information of the MMC card and the phone memory

2010-05-12 Thread Kimmo Hämäläinen
Hi,

On Wed, 2010-05-12 at 07:39 +0200, ext Pallavi Kandhare wrote:
..


 2. On mobile certain aplications are running at a time. (ed. clock,
calender etc). How 
 can i find out and list all these applications.
  


There is nothing very convenient for this but you can do it using the
same API as the window manager (hildon-desktop) uses: XQueryTree and
reading some window properties with XGetWindowProperty.  You could get a
some kind of list by taking top-level (== parent is the root window)
windows that have _NET_WM_WINDOW_TYPE property set to
_NET_WM_WINDOW_TYPE_NORMAL.

I'm attaching the source code of a small utility that uses XQueryTree,
you could use it as a starting point.

-Kimmo
#include X11/Xlib.h
#include X11/Xatom.h
#include stdio.h
#include stdlib.h
#include string.h

static Atom class_atom, name_atom, name_atom2, xembed_atom, pid_atom,
trans_atom, hildon_stack_atom,
utf8_string_atom,
	current_app_atom, win_type_atom, wm_state_atom, theme_atom,
portrait_support, portrait_request, non_comp_atom;

static char *get_atom_prop(Display *dpy, Window w, Atom atom)
{ 
  Atom type;
  int format, rc;
  unsigned long items;
  unsigned long left;
  Atom *value;
	  char *copy;

  rc = XGetWindowProperty (dpy, w, atom, 0, 1, False,
  XA_ATOM, type, format,
  items, left, (unsigned char**)value);
  if (type != XA_ATOM || format == 0 || rc != Success) {
	copy = strdup();
	  } else {
	char *s = XGetAtomName(dpy, *value);
	copy = strdup(s);
	XFree(s);
  }
  return copy;
}

static Window get_win_prop(Display *dpy, Window w, Atom atom)
{ 
  Atom type;
  int format, rc;
  unsigned long items;
  unsigned long left;
  Window *value;

  rc = XGetWindowProperty (dpy, w, atom, 0, 1, False,
  XA_WINDOW, type, format,
  items, left, (unsigned char**)value);
  if (type == None || rc != Success)
return 0;
  else
  {
return *value;
  }
}

static unsigned long get_card_prop(Display *dpy, Window w, Atom atom)
{ 
  Atom type;
  int format, rc;
  unsigned long items;
  unsigned long left;
  unsigned long *value;

  rc = XGetWindowProperty (dpy, w, atom, 0, 1, False,
  XA_CARDINAL, type, format,
  items, left, (unsigned char**)value);
  if (type == None || rc != Success)
return 0;
  else
  {
return *value;
  }
}

static long get_int_prop(Display *dpy, Window w, Atom atom)
{ 
  Atom type;
  int format, rc;
  unsigned long items;
  unsigned long left;
  unsigned long *value;

  rc = XGetWindowProperty (dpy, w, atom, 0, 1, False,
  XA_INTEGER, type, format,
  items, left, (unsigned char**)value);
  if (type == None || rc != Success)
return -1;
  else
  {
return *value;
  }
}

static long get_xembed_prop(Display *dpy, Window w)
{ 
  Atom type;
  int format, rc;
  unsigned long items;
  unsigned long left;
  unsigned long *value;

  rc = XGetWindowProperty (dpy, w, xembed_atom, 0, 2, False,
  XA_CARDINAL, type, format,
  items, left, (unsigned char**)value);
  if (type == None || rc != Success)
return -1;
  else
  {
	long ret;
	ret = value[1]  (1  0);
	XFree(value);
return ret;
  }
}

static char *get_str_prop(Display *dpy, Window w, Atom atom)
{ 
  Atom type;
  int format, rc;
  unsigned long items;
  unsigned long left;
  char *value;

  rc = XGetWindowProperty (dpy, w, atom, 0, 200, False,
  XA_STRING, type, format,
  items, left, (unsigned char**)value);
  if (type == None || rc != Success)
return NULL;
  else
  {
char *s = strdup((const char*)value);
	XFree(value);
return s;
  }
}

static char *get_utf8_prop(Display *dpy, Window w, Atom atom)
{ 
  Atom type;
  int format, rc;
  unsigned long items;
  unsigned long left;
  char *value;

  rc = XGetWindowProperty (dpy, w, atom, 0, 200, False,
   utf8_string_atom, type, format,
   items, left, (unsigned char**)value);
  if (type == None || rc != Success)
return NULL;
  else
  {
char *s = strdup((const char*)value);
	XFree(value);
return s;
  }
}

static const char 

RE: Why should I write apps for Maemo?

2010-05-07 Thread Kimmo Hämäläinen
On Fri, 2010-05-07 at 13:21 +0200, ext Matan Ziv-Av wrote:
 On Fri, 7 May 2010, tero.k...@nokia.com wrote:
...
 I am specifically interested in hildon-desktop packages 
 (hildon-desktop, hildon-home, hildon-status-menu, etc.), and libhildon.

Those are all developed in completely open Gitorious.  Just compile it
from there (most of them have 1.2 branches). Everything on the way to
pr1.2 is already there:

http://maemo.gitorious.org/fremantle-hildon-desktop
http://maemo.gitorious.org/hildon

-Kimmo

 
 
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: Why should I write apps for Maemo?

2010-05-07 Thread Kimmo Hämäläinen
On Fri, 2010-05-07 at 14:13 +0200, ext Matan Ziv-Av wrote:
 On Fri, 7 May 2010, Kimmo Hämäläinen wrote:
 
  On Fri, 2010-05-07 at 13:21 +0200, ext Matan Ziv-Av wrote:
  On Fri, 7 May 2010, tero.k...@nokia.com wrote:
  ...
  I am specifically interested in hildon-desktop packages
  (hildon-desktop, hildon-home, hildon-status-menu, etc.), and libhildon.
 
  Those are all developed in completely open Gitorious.  Just compile it
  from there (most of them have 1.2 branches). Everything on the way to
  pr1.2 is already there:
 
  http://maemo.gitorious.org/fremantle-hildon-desktop
  http://maemo.gitorious.org/hildon
 
 For hildon-desktop I see a list of 27 branches. Among them is one called 
 PR1_1, but none called PR1_2. Similarly for the rest of the packages. 
 What branch contains the exact code that is expected to be in PR1.2?

The master is PR1.2. Take the latest tag.  I believe this applies for
libhildondesktop, libmatchbox2, libclutter, hildon-status-menu also.  At
some point the master may or may not be branched and the guys will start
working on the next maintenance release.

It would be best to have some Maemo/Meego-wide convention for this,
yes...

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?

2010-05-04 Thread Kimmo Hämäläinen
On Tue, 2010-05-04 at 16:01 +0200, ext Javier S. Pedro wrote:
 Frantisek Dufka wrote:
  I am not sure why there are three X windows in info.info.x11 structure
  (fswindow, wmwindow and window). From brief look into SDL sources it
  seems to me like the 'window' is  used when SDL is initialized with not
  owned pre-created window passed to SDL via SDL_WINDOWID variable,
  otherwise wmwindow and fswindow are used depending of full screen state.
  In case you are not using SDL_WINDOWID maybe setting wmwindow and
  fswindow would help you with volume keys?
 
 WMwindow and FSwindow are containers for window (aka gfxwindow) which is
 the one where images are pushed into. On the Fremantle SDL, WMwindow and
 FSwindow are alternatively mapped when changing from windowed to fullscreen
 mode and viceversa -- on a normal SDL, WMwindow is always mapped.

Sounds a bit brain-damaged to have two windows when others do fine with
one... But if it must be so, you need to put the ZOOM_KEY property to
both windows because the topmost counts.

-Kimmo

 Also, 
 gfxdisplay - window (gfxwindow)
 display - wmwindow,fswindow
 
 Else you will get permission errors when you start trying to do more
 complicated things.
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?

2010-05-03 Thread Kimmo Hämäläinen
On Sun, 2010-05-02 at 13:26 +0200, ext Till Harbaum / Lists wrote:
 Hi,
 
 i'd like to access the zoom keys in a SDL/SDL_gles app (the 3d globe
 i uploaded to extras-devel).
 
 The odd thing is that my solution only partly works. Some key presses actually
 reach my app as function key presses, but still most of them reach the volume
 control. So when repeatedly pressing the zoom buttons my app zooms but also
 the volume is changed.
 
 I am using the following code which is inspired by code from scummvm. I am 
 calling this code once immediately after the SDL setup is done.
 
 Any idea why this still delivers some key events to the volume control?

It could be that _NET_ACTIVE_WINDOW or MB_CURRENT_APP_WINDOW on the root
window does not correspond to your window.  The volume app is tracking
one of these (I think _NET_ACTIVE_WINDOW) to determine the window whose
ZOOM_KEY window property matters.

-Kimmo

 
   SDL_SysWMinfo info;
   SDL_VERSION(info.version); 
  
   if ( SDL_GetWMInfo(info) ) {   
  
 
 /* We use the SDL GFX display (we're using the GFX window too after all) 
 */
 Display *dpy = info.info.x11.display;
 unsigned long val = 1;
 Atom atom_zoom = XInternAtom(dpy, _HILDON_ZOOM_KEY_ATOM, 0);
 info.info.x11.lock_func();
 Window win = info.info.x11.window;
 XUnmapWindow(dpy,win);
 XChangeProperty 
 (dpy,win,atom_zoom,XA_INTEGER,32,PropModeReplace,(unsigned char *) val,1);
 XMapWindow(dpy,win);
 info.info.x11.unlock_func();
   }
 
 Till
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Splitting windows vertically

2010-04-27 Thread Kimmo Hämäläinen
On Mon, 2010-04-26 at 17:28 +0200, ext Charles Clément wrote:
 On Mon, Apr 26, 2010 at 04:20:37PM +0300, Kimmo Hämäläinen wrote:
  On Sun, 2010-04-25 at 03:24 +0200, ext Charles Clément wrote:
   Hello,
   
   I have an application, an input method, that doesn't need all the screen
   estate because it is not a virtual keyboard. By default in maemo, if I
   set a size for the window, it will show my application window in a
   horizontal layout, with the normal application above it and my window
   below.
   
   I would like to know if there is a way to run the two windows
   side-by-side, one being at the left of the screen and the other one
   taking the space on the right.
  
  You could do this with an override-redirect window, the window manager
  does not resize those and lets you place them anywhere you like. You
  need to set it before mapping (showing) your window. See the Xlib manual
  or GTK API how to do it.
 
 Yes, thank you, I tried using an override-redirect window. The problem
 with that solution is that the application window is not resized and
 still takes the whole screen estate. The input method window will then
 mask part of the application window which is not really a practical
 because a text field can be as wide as the whole screen, e.g. when
 writing the body of an email.

That's right. You cannot have an application window that does not occupy
the whole screen because that is against the UI design. However, you
could perhaps position the input method window so that it does not cover
the text field you are writing to...

-Kimmo

 
  
  -Kimmo
  
   
   Thanks,
   
  
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Squeeze devkit to be installed to autobuilder

2010-04-27 Thread Kimmo Hämäläinen
On Tue, 2010-04-27 at 16:00 +0200, ext Marcin Juszkiewicz wrote:
...
 1. Setup
 2. FREMANTLE_ARMEL
 3. cs2007q3-glibc2.5-arm7
 4. debian-squeeze
 5. none (as CPU-transparency method)

You need to use qemu as CPU-transparency here...

-Kimmo

 6. do not extract rootstrap
 7. installed default set of files to target
 
 and landed in:
 [sbox-FREMANTLE_ARMEL: ~]  
 
 CFLAGS=-Wall -g -O2 -mthumb ./configure --host=arm-linux-gnueabi --
 build=arm-linux-gnueabi --prefix=/usr --sysconfdir=/etc --
 mandir=\${prefix}/share/man --infodir=\${prefix}/share/info 
 checking for a BSD-compatible install... /scratchbox/tools/bin/install -c
 checking whether build environment is sane... yes
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking for arm-linux-gnueabi-gcc... arm-linux-gnueabi-gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... configure: error: cannot run C 
 compiled programs.
 If you meant to cross compile, use `--host'.
 See `config.log' for more details.
 make: *** [configure-stamp] Error 1
 
 
  Then you apt-get install maemo-sdk-symbols from extras-devel and you are
  done.
 
 mdbus2 package fails at configure step
 
 
 Regards, 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Splitting windows vertically

2010-04-26 Thread Kimmo Hämäläinen
On Sun, 2010-04-25 at 03:24 +0200, ext Charles Clément wrote:
 Hello,
 
 I have an application, an input method, that doesn't need all the screen
 estate because it is not a virtual keyboard. By default in maemo, if I
 set a size for the window, it will show my application window in a
 horizontal layout, with the normal application above it and my window
 below.
 
 I would like to know if there is a way to run the two windows
 side-by-side, one being at the left of the screen and the other one
 taking the space on the right.

You could do this with an override-redirect window, the window manager
does not resize those and lets you place them anywhere you like. You
need to set it before mapping (showing) your window. See the Xlib manual
or GTK API how to do it.

-Kimmo

 
 Thanks,
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: python app at portrait mode all the time

2010-04-26 Thread Kimmo Hämäläinen
On Sat, 2010-04-24 at 21:03 +0200, ext Faheem Pervez wrote:
 The part you want is in the orientation_changed function.
 
 Try:
 
 hildon.hildon_gtk_window_set_portrait_flags(window,
 hildon.PORTRAIT_MODE_SUPPORT | hildon.PORTRAIT_MODE_REQUEST)

This does not work if you have e.g. dialog that requires landscape mode
(because of text input, for example) on top of you. Unfortunately, there
is no way to force yourself portrait in the case your window is not the
topmost window.

-Kimmo

 On 4/24/10, pelt...@gmail.com pelt...@gmail.com wrote:
  Hi, is there a single or two rows way to define a python app to stay at
  portrait mode all the time?
 
  Tried to look through autorotation stuff from portrait.py[1]  but didn't
  manage to find anything that I could use straight on.
  http://talk.maemo.org/showthread.php?t=31940
  [1]http://repo.or.cz/w/gpodder.git?a=blob;f=src/gpodder/gtkui/frmntl/portrait.py
 
  I am trying to make a simple portrait sms python app as requested at tmo.
 
  So if someone knows how to do that as simple as possible, I'd appreciate
  some tips.
 
  Ossipena / TimoP
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Inhibiting device auto-lock on N900

2010-04-20 Thread Kimmo Hämäläinen
On Tue, 2010-04-20 at 11:05 +0200, ext Per von Zweigbergk wrote:
 Thank you for this information. It is close to what I've been looking
 for. 
 
 However, is this really what happens for example if there is an
 incoming call - that the phone app sends a request to the phone to
 unlock? Rather than use an API to show information above the lockout
 screen... if so this could be a security problem. 
 
 I did not find any API call which allows me to turn off the backlight
 but still keep the application responsive however. Hmm. 

Media Player uses the Do not disturb flag(* in its window to prevent
the screen going off when you are watching a video.  hildon-desktop
notices the flag in the window and periodically sends do not blank the
screen yet, please D-Bus messages to the MCE daemon.

You could use this flag in your window, or send the D-Bus messages
yourself.

*) libhildon has hildon_gtk_window_set_do_not_disturb() convenience
function. Or you can set the window property using the x11 API directly.

-Kimmo

 - Ursprungsmeddelande - 
  Hello. 
  
  To unlock the device : 
  http://wiki.maemo.org/User:Jebba/DBUS#dbus-send-unlock 
  
  To keep the display on and device unlocked : 
 
 http://maemo.org/api_refs/4.0/libosso/group__Devstate.html#g93fe32aeb992e128c94b890d6f801bfd
  
  
  David. 
  
  Per von Zweigbergk wrote: 
   I'm writing a talking clock application. The purpose of this
 application is 
   to answer the ever-so-frequent question mghhnm, what time is it
 in the 
   morning, just before you've been able to open your eyes properly
 much less put 
   on your glasses. 
   
   I've already written the application itself, it was a fairly
 simple project 
   that took a couple of hours. In testing, however, I discovered a
 slight 
   drawback to my planned approach of start the program before
 falling asleep, 
   mash the screen in the morning and it'll tell me the time. 
   
   1. The screen itself will stop accepting taps when the device is
 turned off. 
   It seems this particular feature can be inhibited by leaving the
 phone slided 
   open (with the qwerty keyboard exposed) or by setting the gconf
 setting 
   /system/osso/dsm/locks/touchscreen_keypad_autolock_enabled to
 false. This 
   requires you to slide the lock button on the side of the phone to
 unlock the 
   screen. Annoying, but still doable even in a half-awake stupor.
 And besides, 
   you can always leave the phone activated in its opened mode. 
   
   2. The device will automatically lock itself after 5 minutes, for
 security 
   purposes. Now, remembering and correctly entering the device lock
 code in a 
   half-awake stupor is considerably more difficult. This can be
 disabled by 
   setting the gconf
 setting /system/osso/dsm/locks/devicelock_autolock_enabled. 
   
   However - I don't really like this approach of changing gconf user
 settings to 
   inhibit device locks. The last thing I want is for the phone or my
 application 
   to crash (or more likely, to run out of battery) while the program
 is running 
   and leaving the device unlocked, requiring the user to set the
 automatic lock 
   option on again (if he even notices it's been disabled). 
   
   Whoever coded the built-in media player agrees with this. He's
 found some way 
   to tell the system not to automatically lock itself without
 changing the gconf 
   settings. I have not yet figured out how. 
   
   One other option worth considering is the fact that some
 applications, such as 
   the phone (for an incoming call) and the alarm application (to
 silence the 
   infernal bleeping of an alarm) will allow you to throw up a screen
 to the user 
   that'll be accessible even if the lock code has not been entered.
 This would 
   also solve the potential security issue of somebody stealing your
 phone while 
   you're sleeping to get to it while it's unlocked. :-) 
   
   So, does anybody have any ideas as to how I might acheive this in
 some way? 
   ___ 
   maemo-developers mailing list 
   maemo-developers@maemo.org 
   https://lists.maemo.org/mailman/listinfo/maemo-developers 
  
 
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: j2me

2010-04-19 Thread Kimmo Hämäläinen
On Mon, 2010-04-19 at 11:12 +0200, ext Christopher Intemann wrote:
 On Sun, Apr 18, 2010 at 7:12 PM, Christopher Intemann
 intem...@gmail.com wrote:
 Is there any stupid security mechanism in maemo preventing me
 to change permissions for files or what am I doing wrong?
 
 
 Its working now. The cvm files were in the MyDocs directory, which is
 mounted non-executeable. I've moved them somewhere else now.
 However, it seems to crash (cannot start jvm). I will perform some
 more testing later.
 Die anyone else ever try to run phoneme on the N900?
 Is there any reason for MyDocs beeing mounted noexec? Or, furthermore,
 any good reason for not remounting it exec?

The main reason could be that if you are running a program from MyDocs,
you cannot unmount it anymore and use it as USB mass storage.  Even with
Windows machines, you don't usually run programs from USB sticks if you
think about it...

-Kimmo



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [pymaemo] hildon-desktop: getting D-Bus?

2010-04-14 Thread Kimmo Hämäläinen
On Tue, 2010-04-13 at 23:19 +0200, ext Thomas Waelti wrote:
 (Crossposting to maemo-devel, hoping for a Hildon-Desktop or D-Bus expert to 
 pick this up. Original thread is at 
 https://garage.maemo.org/pipermail/pymaemo-developers/2010-April/001444.html )
 
 Thanks for a very interesting input. Unfortunately, it didn't work for my 
 needs, as I must get my hands on the SYSTEM bus, not the Session one.
 I tried your example, changing it to
 
 self.bus = 
 dbus.bus.BusConnection(unix:abstract=/var/run/dbus/system_bus_socket)
 
 However, I get this error:
 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to 
 connect to socket /var/run/dbus/system_bus_socket: Connection refused
 
 
 Isn't this the correct address of the system dbus?
 Or do I have a permission (or other) problem when trying to get on the 
 system-dbus from hildon-desktop?

You mean hildon-home (hildon-desktop does not have plugins). I found
some code from
http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html#connecting-to-the-bus

=
import dbus
from dbus.mainloop.glib import DBusGMainLoop

dbus_loop = DBusGMainLoop()

bus = dbus.SessionBus(mainloop=dbus_loop)
=

Just replace SessionBus with SystemBus, yes?

-Kimmo

 
 
 Thanks all
 -Tom
 
 
  As a follow-up to the discussion about d-bus from a hildon widget a
  few days ago that I found out while having the same problem, I've
  finally managed to get something that seems to be working for me:
 
  # Create a session bus.
  import dbus
  from dbus.mainloop.glib import DBusGMainLoop
  dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
  from os import environ
  bus = dbus.bus.BusConnection(environ[DBUS_SESSION_BUS_ADDRESS])
 
  And then bus can be used as usual. I haven't done a whole lot of
  testing, as I just found this out, but it appears to be working both
  in command line mode and as a home widget.
   Yves.
  ___
  pymaemo-developers mailing list
  pymaemo-develop...@garage.maemo.org
  https://garage.maemo.org/mailman/listinfo/pymaemo-developers
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: N900 Mameo5 mediaplayer not able to launch from Command line

2010-04-09 Thread Kimmo Hämäläinen
On Fri, 2010-04-09 at 12:24 +0200, ext praveen koduru wrote:
 It is giving the following error from N900 shell prompt,
  Failed to open connection to session message bus: (null)

Maybe you are running the command as root? Do su - user first to login
as user.

-Kimmo

 -Praveen 
 
 
  
 On Fri, Apr 9, 2010 at 3:42 PM, praveen koduru prawin1...@gmail.com
 wrote:
 Hi,
  
 I am trying  to launch media player from command line prompt.
 dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer
 com.nokia.mediaplayer.mime_open
 string:file:///home/user/MyDocs/.videos/9.mp4
  
 But this not launching mediaplayer and even No error was found
 on the terminal.
  
 Whereas I am able to launch browser and all other from command
 line through dbus-send commands.
  
 Any help will be greatly appreciated.
  
 -Praveen.
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: SGX library modifications?

2010-04-06 Thread Kimmo Hämäläinen
On Tue, 2010-04-06 at 12:34 +0200, ext Ahmed Ammar wrote:
 On Thu, 2010-04-01 at 21:55 +0200, Ahmed Ammar wrote:
  On Thu, 2010-04-01 at 11:05 +0300, Kimmo Hämäläinen wrote:
I've currently got most things ported correctly using your xorg server.
Just doing the big part of porting your kernel changes to 2.6.33.
  
  Kimmo,
  
  I've ported the pvr stuff to the 2.6.33 kernel but I'm now hitting a
  problem with X:
  
  (EE) AIGLX error: dlopen of /usr/lib/dri/pvr2d_dri.so failed 
  (/usr/lib/dri/pvr2d
  _dri.so: cannot open shared object file: No such file or directory) 
  
  (EE) AIGLX: reverting to software rendering   
  
  Now, I can't find pvr2d_dri.so anywhere in maemo SDK too, is X
  supposed to fall back to software rendering?
 
 Kimmo,
 
 Any response on the above?

I see libpvr2d.so in the device, maybe that's the one?  I see no
*_dri.so anywhere...

-Kimmo

 
 Best Regards,

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: SGX library modifications?

2010-04-01 Thread Kimmo Hämäläinen
On Wed, 2010-03-31 at 17:28 +0200, ext Ahmed Ammar wrote:
 On Wed, 2010-03-31 at 18:18 +0300, Kimmo Hämäläinen wrote:
  On Wed, 2010-03-31 at 15:16 +0200, ext Ahmed Ammar wrote:
   Hello,
   
   While trying to compile xserver-xorg-video-fbdev_0.4.0-180+0m5.tar.gz I
   have come across missing definitions:
   
   sgx_exa.c:79: error: ‘EURASIA_TAG_STRIDE_THRESHOLD’ undeclared (first
   use in this function)
   
   After further digging and installing of the maemo5 SDK I found that
   these are provided by opengles-sgx-img-common-dev. And after chatting
   with Stskeeps on IRC I was informed that Nokia have actually modified
   the SGX libraries.
   
   I would like to know how Nokia have managed to do so? Have they gotten
   the source for the drivers from ImgTec? Are they actually different to
   those available from TI? 
  
  Yes, we had access to the source code, but mostly the modifications were
  done by ImgTec developers.
  
   Would it be possible for someone to use your binaries outside the maemo
   project?
  
  I guess if the SGX chip is the same (and you have compatible X parts).
  
   Also, could this be forward ported to newer libraries from TI/ImgTec? 
  
  I'm sure all generic fixes were forward ported, but notice that the
  driver in Fremantle is a bit old compared to the upstream.
 
 Thanks for the quick response Kimmo,
 
 So as I expected, any reason why ImgTec decided not to take this into
 their TI driver pack? 

Janusz, do you know/remember?

 I've currently got most things ported correctly using your xorg server.
 Just doing the big part of porting your kernel changes to 2.6.33.

Cool :)

-Kimmo

 Best Regards,

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: SGX library modifications?

2010-03-31 Thread Kimmo Hämäläinen
On Wed, 2010-03-31 at 15:16 +0200, ext Ahmed Ammar wrote:
 Hello,
 
 While trying to compile xserver-xorg-video-fbdev_0.4.0-180+0m5.tar.gz I
 have come across missing definitions:
 
 sgx_exa.c:79: error: ‘EURASIA_TAG_STRIDE_THRESHOLD’ undeclared (first
 use in this function)
 
 After further digging and installing of the maemo5 SDK I found that
 these are provided by opengles-sgx-img-common-dev. And after chatting
 with Stskeeps on IRC I was informed that Nokia have actually modified
 the SGX libraries.
 
 I would like to know how Nokia have managed to do so? Have they gotten
 the source for the drivers from ImgTec? Are they actually different to
 those available from TI? 

Yes, we had access to the source code, but mostly the modifications were
done by ImgTec developers.

 Would it be possible for someone to use your binaries outside the maemo
 project?

I guess if the SGX chip is the same (and you have compatible X parts).

 Also, could this be forward ported to newer libraries from TI/ImgTec? 

I'm sure all generic fixes were forward ported, but notice that the
driver in Fremantle is a bit old compared to the upstream.

-Kimmo

 
 Best Regards,

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: N900 USB Networking

2010-03-19 Thread Kimmo Hämäläinen
On Fri, 2010-03-19 at 09:39 +0100, ext van Porten, Oliver wrote:
  -Original Message-
  From: Tomi Ollila [mailto:tomi.oll...@guru.guru-group.fi] 
  Sent: Thursday, March 18, 2010 5:27 PM
  To: Kimmo Hämäläinen
  Cc: van Porten, Oliver; maemo-developers@maemo.org
  Subject: Re: N900 USB Networking
  
  On Thu 18 Mar 2010 07:13, Kimmo Hämäläinen 
  kimmo.hamalai...@nokia.com writes:
  
   On Wed, 2010-03-17 at 15:17 +0100, ext van Porten, Oliver wrote:
   Hi list,

   I've tried following this guide to setup USB networking 
  with my Windows
   PC:
   http://wiki.maemo.org/N900_USB_networking#Windows_XP
   
   Windows asked for a driver for the RNDIS gadget once and I 
  installed it.
   
   I'm using the Mad-Developer Application to load g_ether. 
  When I do that,
   the N900 will reboot.
  
   You should use g_nokia instead of g_ether.
  
  With g_nokia, usb networking does not work with Windows host 
  (nor with Mac OS Snow Leopard, only with Linux  Leopard or less).
  
  Windows does not regognize the information g_nokia announces to it
  to be able to work as usb ethernet mode, only RNDIS works 
  with Windows.
  
  But, that N900 reboots is an interesting problem; does not happen to
  us. I wrote a longer note in the talk thread... and now I must run...
  
 
 I just tried first loading g_ether and configuring usb via mad-developer 
 which works. As soon as I plug-in the USB cable the mode selection will popup 
 and some seconds afterwards (no matter what my action is) the device will 
 reboot, showing sort of a usb icon in the top right corner.
 
 Is there any way to grab logs or something from what's happening there?

If it reboots, it's most probably a kernel crash... In that case syslog
might have some messages (or not).

 I've installed 'Crash Reporter' and it seems to have logged something (but 
 Was unable to send the report just now).
 Can I access those somehow?

You can unpack the crash dump file with rich-core-extract utility.

-Kimmo

 
 Oliver
 
  
   -Kimmo
  
  Tomi
  
  
   At one point Windows seemed to re-recognize the device at 
  first but then
   again the N900 went for a reboot and Windows did not find 
  it any more.
   
   Did anyone ever experience something like this? 
   Am I doing something wrong?
   
   I tried google'ing for a solution but could not find one yet. 
   
   Any hints appreciated.
   
   Best,
   Oliver

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: N900 USB Networking

2010-03-18 Thread Kimmo Hämäläinen
On Wed, 2010-03-17 at 15:17 +0100, ext van Porten, Oliver wrote:
 Hi list,
  
 I've tried following this guide to setup USB networking with my Windows
 PC:
 http://wiki.maemo.org/N900_USB_networking#Windows_XP
 
 Windows asked for a driver for the RNDIS gadget once and I installed it.
 
 I'm using the Mad-Developer Application to load g_ether. When I do that,
 the N900 will reboot.

You should use g_nokia instead of g_ether.

-Kimmo

 At one point Windows seemed to re-recognize the device at first but then
 again the N900 went for a reboot and Windows did not find it any more.
 
 Did anyone ever experience something like this? 
 Am I doing something wrong?
 
 I tried google'ing for a solution but could not find one yet. 
 
 Any hints appreciated.
 
 Best,
 Oliver
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Disabling WM animations

2010-03-15 Thread Kimmo Hämäläinen
On Mon, 2010-03-15 at 08:43 +0100, ext Sivan Greenberg wrote:
 I would actually want to disable it for performance reasons. The
 current eye candy is pretty tough for the N900 IMHO and causes lots of
 problems when all sorts of events are arriving simultaneously.

This can be done by hacking util/hd-transitions.c and
home/hd-task-navigator.c, removing all the Clutter timeline playing
stuff.  Easier way could be shortening their duration to 0.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Disabling WM animations

2010-03-15 Thread Kimmo Hämäläinen
On Mon, 2010-03-15 at 08:59 +0100, ext Sivan Greenberg wrote:
 Why isn't there anything in the settings UI to control this outside
 the code? Like the Appearance manager in Ubuntu.

Because the only people wanting this are nerds and nerds can code ;)

-Kimmo

 
 Sivan
 
 2010/3/15 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
 On Mon, 2010-03-15 at 08:43 +0100, ext Sivan Greenberg wrote:
  I would actually want to disable it for performance reasons.
 The
  current eye candy is pretty tough for the N900 IMHO and
 causes lots of
  problems when all sorts of events are arriving
 simultaneously.
 
 
 This can be done by hacking util/hd-transitions.c and
 home/hd-task-navigator.c, removing all the Clutter timeline
 playing
 stuff.  Easier way could be shortening their duration to 0.
 
 -Kimmo
 
 
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to enable mouse icon to be visible on N900?

2010-03-12 Thread Kimmo Hämäläinen
On Fri, 2010-03-12 at 10:19 +0100, ext 韩茂琨 wrote:
 Hi,
 
 I searched solutions but failed to enable it. Even worse, I found No mouse 
 cursor available yet. The trick from alpha version to make mouse cursor 
 visible doesn't work any more in Maemo5 final version (some applications like 
 tuxpaint draw a mouse cursor and can be started from the command line) 
  on http://omappedia.org/wiki/Maemo_Getting_Started.  Do you have a clue? 
 Thanks!

What trick does not work?  XDefineCursor() should work as before (in
N900 at least, maybe not in Scratchbox).

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Performance of floating point instructions

2010-03-10 Thread Kimmo Hämäläinen
On Wed, 2010-03-10 at 10:46 +0100, ext Ove Kaaven wrote:
 Alberto Mardegan skrev:
  Does anyone know any tricks to optimize certain operations on arrays of
  data?
 
 The answer to that is, obviously, to use the Cortex-A-series SIMD
 engine, NEON.
 
 Supposedly you may be able to make gcc generate NEON instructions with
 -mfpu=neon -ffast-math -ftree-vectorize (and perhaps -mfloat-abi=softfp,
 but that's the default in the Fremantle SDK anyway), but it's still not
 very good at it, so writing the asm by hand is still better... and I'm
 not sure if it can automatically vectorize library calls like sqrt.

You can also put the CPU to a fast floats mode, see hd_fpu_set_mode()
in
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/src/main.c

N900 has support for NEON instructions also.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Performance of floating point instructions

2010-03-10 Thread Kimmo Hämäläinen
On Wed, 2010-03-10 at 12:57 +0100, ext Alberto Mardegan wrote:
 Kimmo Hämäläinen wrote:
  You can also put the CPU to a fast floats mode, see hd_fpu_set_mode()
  in
  http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/src/main.c
  
  N900 has support for NEON instructions also.
 
 This sounds interesting!
 
 Is there any performance penalty if this switch is done often?

IIRC, there was not. Leonid Moiseichuk was testing this about a year
ago, and he noticed almost 50% speed-up for floats. Notice that this
affects only floats, not doubles, and that there is a small accuracy
penalty.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Problem running ogles2 program on Nokia N900

2010-02-25 Thread Kimmo Hämäläinen
On Wed, 2010-02-24 at 22:37 +0100, ext Jonny Karlsson wrote:
 I have successfully compiled an OpenGL ES 2.0 program on scratchbox for 
 the FREMANTILE_ARMEL plattform. However, when running the program on Nokia 
 N900 the compilation of the vertex and fragment shaders fails. This is the 
 error code:
 
 
 Failed to compile fragment shader: Compile failed.
 ERROR: 0:1: 'varying' : syntax error; parse error
 ERROR: 1 compilation errors. No code generated.

mediump varying - varying mediump

 
 Failed to compile fragment shader: Compile failed.
 ERROR: 0:1: 'attribute' : syntax error; parse error
 ERROR: 1 compilation errors. No code generated.

Try removing highp/lowp/mediump from attributes, since those are given
as input, so maybe you cannot define their precision.

-Kimmo

 
 
 Failed to link program: Link Error: Vertex shader is missing.
 Link Error: Fragment shader is missing.
 --
 
 This is my vertex shader:
 
   const char* pszVertShader = \
 
   highp attribute vec4 myVertex;\
   lowp attribute vec4 fargKod;\
   mediump attribute vec2 myUV;\
   highp uniform mat4 yRotMatris;\
   highp uniform mat4 xRotMatris;\
   highp uniform mat4 frustMatris;\
   lowp varying vec4 outColor;\
   mediump varying vec2 myTextCoord;\
   void main(void)\
   {\
   outColor = fargKod;\
   myTextCoord = myUV;\
   gl_Position = myVertex * yRotMatris * xRotMatris;\
 
   };
 
 and this is my fragment shader:
 
   const char* pszFragShader = \
   uniform sampler2D sampler2d;\
   mediump varying vec2 myTextCoord;\
   void main (void)\
   {\
   gl_FragColor = texture2D(sampler2d,myTextCoord);\
   };
 
 
 These shader compile successfully and works fine when I run the same 
 OGLES2 program in the simulation environment.
 
 Does anyone have a clue what could be wrong? Is there perhaps something 
 that need to be installed on the Nokia N900 to add shader compilation 
 support to it???
 
 
 /Jonny
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Problem running ogles2 program on Nokia N900

2010-02-25 Thread Kimmo Hämäläinen
On Thu, 2010-02-25 at 10:38 +0100, ext Jonny Karlsson wrote:
 Thank you for your prompt answer!
 
 I noticed I had precision and variable type the wrong way and changed that 
 (it still worked in the emulator though). I also removed the precision 
 values from all attributes. But I still get the same error. This is very 
 weird, it 
 seams like the shader code is not recognized on the Nokie device at all..

We use shaders in hildon-desktop. Maybe looking at those helps with the
syntax:
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/src/tidy/tidy-blur-group.c

Notice that the GLES shader specification allows the implementation to
slack at times when it comes to precisions. 
http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

-Kimmo

 
 /Jonny
 
 
 On Thu, 25 Feb 2010, Kimmo Hämäläinen wrote:
 
  On Wed, 2010-02-24 at 22:37 +0100, ext Jonny Karlsson wrote:
  I have successfully compiled an OpenGL ES 2.0 program on scratchbox for
  the FREMANTILE_ARMEL plattform. However, when running the program on Nokia
  N900 the compilation of the vertex and fragment shaders fails. This is the
  error code:
 
  
  Failed to compile fragment shader: Compile failed.
  ERROR: 0:1: 'varying' : syntax error; parse error
  ERROR: 1 compilation errors. No code generated.
 
  mediump varying - varying mediump
 
 
  Failed to compile fragment shader: Compile failed.
  ERROR: 0:1: 'attribute' : syntax error; parse error
  ERROR: 1 compilation errors. No code generated.
 
  Try removing highp/lowp/mediump from attributes, since those are given
  as input, so maybe you cannot define their precision.
 
  -Kimmo
 
 
 
  Failed to link program: Link Error: Vertex shader is missing.
  Link Error: Fragment shader is missing.
  --
 
  This is my vertex shader:
 
 const char* pszVertShader = \
 
 highp attribute vec4 myVertex;\
 lowp attribute vec4 fargKod;\
 mediump attribute vec2 myUV;\
 highp uniform mat4 yRotMatris;\
 highp uniform mat4 xRotMatris;\
 highp uniform mat4 frustMatris;\
 lowp varying vec4 outColor;\
 mediump varying vec2 myTextCoord;\
 void main(void)\
 {\
 outColor = fargKod;\
 myTextCoord = myUV;\
 gl_Position = myVertex * yRotMatris * xRotMatris;\
 
 };
 
  and this is my fragment shader:
 
 const char* pszFragShader = \
 uniform sampler2D sampler2d;\
 mediump varying vec2 myTextCoord;\
 void main (void)\
 {\
 gl_FragColor = texture2D(sampler2d,myTextCoord);\
 };
 
 
  These shader compile successfully and works fine when I run the same
  OGLES2 program in the simulation environment.
 
  Does anyone have a clue what could be wrong? Is there perhaps something
  that need to be installed on the Nokia N900 to add shader compilation
  support to it???
 
 
  /Jonny
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Problem running ogles2 program on Nokia N900

2010-02-25 Thread Kimmo Hämäläinen
On Thu, 2010-02-25 at 13:14 +0100, ext Jonny Karlsson wrote:
 Now I finally managed to get my OGLES2 program working on N900. The 
 variable type and the precision definition was still in the wrong order at 
 one place in my code...
...
 So, at least on N900, the variable type must be defined before the 
 precision value. In the OGLES2-SDK emulator the order of these doesn't 
 matter, it 
 works anyway.

N900 has the same order as the GLES shader specification, so the
emulator is at fault :)

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: reloading a status bar plugin

2010-02-24 Thread Kimmo Hämäläinen
On Tue, 2010-02-23 at 20:06 +0100, ext b0unc3 wrote:
 Hello,
 
 I've created a statusbar plugin, now I want to reload it (eg. when the
 configuration file changes).
 What is the best way to do that ? 

If the plugin can be unloaded and reloaded cleanly (meaning, it does not
crash hildon-status-menu :)), you could touch the .desktop file in some
way (e.g. increase version number inside the file) to make HSM unload
and reload you.

If your plugin is not unloadable, you can do this ugly trick (other
plugins can react to this somehow):

dsmetool -k /usr/bin/hildon-status-menu
dsmetool -t /usr/bin/hildon-status-menu

-Kimmo

 
 
 
 Best Regards,
 Daniele Maio.

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Maemo Touch Screen input capture

2010-02-24 Thread Kimmo Hämäläinen
On Wed, 2010-02-24 at 10:04 +0100, ext Charles wrote:
 Hi,
 
 I am working on a OpenGL ES application (based on PowerVR framework)
 on Maemo and want to capture touch screen input for the application. I
 did not find any touch screen capture in PowerVR libs. Is there any
 other lib that could capture touch screen input for OpenGL ES apps?

The normal way is to use libx11. I.e. call

XSelectInput(dpy, window, ButtonReleaseMask | ButtonPressMask |
PointerMotionMask) 

and then handle the incoming X events ButtonRelease, ButtonPress,
MotionNotify.
(See http://tronche.com/gui/x/xlib/events/types.html)

-Kimmo

 
 Thanks
 
 Charles

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: reloading a status bar plugin

2010-02-24 Thread Kimmo Hämäläinen
On Wed, 2010-02-24 at 13:21 +0100, ext b0unc3 wrote:
...
 
 dsmetool -k /usr/bin/hildon-status-menu
 dsmetool -t /usr/bin/hildon-status-menu
 
 This is the current way I'm doing that, but, as you said, it's ugly.

Yes, because The Right Way is for your plugin to load the new settings
without requiring reloading of the plugin. That should be doable for all
settings, no?  You can look e.g. hildon-desktop that reloads
its /usr/share/hildon-desktop/transitions.ini configuration on-the-fly.
Using Gconf settings (and handling change notifications for them) is
another alternative.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Invoking fremantle symbol menu

2010-02-18 Thread Kimmo Hämäläinen
On Wed, 2010-02-17 at 23:45 +0100, ext Peter Tworek wrote:
 Hi,
 
 I'm looking for a way to show freemantle sym menu without using hildon
 text widgets. I'd like to show it in an application that does not use
 GTK/Hildon as widget toolkit. Is there a way to do this?

Unless I'm completely wrong, drunk, and crazy, that menu is an internal
UI of Hildon input methods and is not part of API exposed outside (since
HIM only knows when it's needed). Some HIM developer could confirm this.
So if you don't use Hildon input methods as all, you'd need to implement
your own input methods.  I'm not sure if the symbol dialog (it's not a
menu) is open or closed source.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-17 Thread Kimmo Hämäläinen
On Tue, 2010-02-16 at 16:07 +0100, ext Evan JIANG wrote:
 Yes. I've tried that.
 But I still have no idea why it crashes on your device.
 It works well here.
 I'm not sure, but maybe you can try:
 1. rm -rf /home/user/.scim
 And reboot to check if it works.
 2. Reinstall it.
 Since someone said it works for him before:
 http://code.google.com/p/scim-for-maemo/issues/detail?id=22can=1
 (Comment 8)
 
 I'm trying to reproduce and fix it now.
 I will let you know if I have any progress on it.

I tracked down the failure a bit, it seems that PanelAgent::initialize()
is failing. So it means that m_socket_server.create() returns false for
some reason.

-Kimmo

 
 Thank you very much!
 
 Best regards,
 Evan JIANG
 2010/2/16 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  On Tue, 2010-02-16 at 10:34 +0100, ext Evan JIANG wrote:
  Hi,
Thank you for your reply.
Which locale are you using?
It's ok to run it under en_US on real device. The application is
  using by lots of users for 2 monthes. I think it should not have such
  problem.
The source code can be found here: 
  http://code.google.com/p/scim-for-maemo/
Well, I admit the source code is a bit complex.
 
  I compiled the mscim package from this Subversion trunk, but it is still
  crashing after I have installed it. Have you used it in a fresh PR1.1
  N900 by just installing those two packages, nothing more?
 
  -Kimmo
 
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-16 Thread Kimmo Hämäläinen
On Mon, 2010-02-15 at 18:06 +0100, ext Evan JIANG wrote:
 Hi,
...
 The application is in mameo extras-devel repository. Could you help me
 to test that?
 You can get it from
 http://repository.maemo.org/extras-devel/pool/fremantle/free/m/mscim/mscim_1.4.7-1maemo5_armel.deb
 It's not the latest version in the repository. Because I've applied my
 workaround since
 mscim_1.4.7-1maemo6_armel, you need to try one before version 1.4.7-1maemo6.
 And please also install mscim-googlepinyin package from maemo
 extras-devel repository. The input method only works after both of
 these 2 packages are installed.

I installed mscim-googlepinyin 0.11.10-1maemo3 and mscim 1.4.7-1maemo5
but it is not working. scim-panel-gtk is crashing with signal 6. I
attached the syslog with one message.

I tried with our latest Maemo5 version and with 51-1 image but the same
thing happens in both.

How to get it to run?

-Kimmo
Feb 16 10:39:47 Nokia-N900-51-1 scim-panel-gtk[1558]: GLIB WARNING ** Gtk - 
Locale not supported by C library. ^IUsing the fallback 'C' locale. 
Failed to initialize Panel Agent! 
Feb 16 10:39:51 Nokia-N900-51-1 crash_reporter_daemon[1294]: 
[creporter_get_rcore_fileinfo]: File: 
/home/user/MyDocs/core-dumps/scim-panel-gtk-6BF7-6-1463.rcore.lzo size 624089   
   
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-16 Thread Kimmo Hämäläinen
On Tue, 2010-02-16 at 10:34 +0100, ext Evan JIANG wrote:
 Hi,
   Thank you for your reply.
   Which locale are you using?
   It's ok to run it under en_US on real device. The application is
 using by lots of users for 2 monthes. I think it should not have such
 problem.
   The source code can be found here: http://code.google.com/p/scim-for-maemo/
   Well, I admit the source code is a bit complex.

I had fi_FI. I tried with en_US but it crashes with that also...  I
think it should not crash whatever the locale is, don't you agree?

-Kimmo

 
 Best regards,
 Evan JIANG
 
 2010/2/16 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  On Mon, 2010-02-15 at 18:06 +0100, ext Evan JIANG wrote:
  Hi,
  ...
  The application is in mameo extras-devel repository. Could you help me
  to test that?
  You can get it from
  http://repository.maemo.org/extras-devel/pool/fremantle/free/m/mscim/mscim_1.4.7-1maemo5_armel.deb
  It's not the latest version in the repository. Because I've applied my
  workaround since
  mscim_1.4.7-1maemo6_armel, you need to try one before version 
  1.4.7-1maemo6.
  And please also install mscim-googlepinyin package from maemo
  extras-devel repository. The input method only works after both of
  these 2 packages are installed.
 
  I installed mscim-googlepinyin 0.11.10-1maemo3 and mscim 1.4.7-1maemo5
  but it is not working. scim-panel-gtk is crashing with signal 6. I
  attached the syslog with one message.
 
  I tried with our latest Maemo5 version and with 51-1 image but the same
  thing happens in both.
 
  How to get it to run?
 
  -Kimmo
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-16 Thread Kimmo Hämäläinen
On Tue, 2010-02-16 at 10:34 +0100, ext Evan JIANG wrote:
 Hi,
   Thank you for your reply.
   Which locale are you using?
   It's ok to run it under en_US on real device. The application is
 using by lots of users for 2 monthes. I think it should not have such
 problem.
   The source code can be found here: http://code.google.com/p/scim-for-maemo/
   Well, I admit the source code is a bit complex.

I compiled the mscim package from this Subversion trunk, but it is still
crashing after I have installed it. Have you used it in a fresh PR1.1
N900 by just installing those two packages, nothing more?

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-15 Thread Kimmo Hämäläinen
On Sun, 2010-02-14 at 04:09 +0100, ext Evan JIANG wrote:
 Thank you for your reply.
 Since I'm on travel now, I may could only try it some days later.
 
 I guess it's cause by the browser and hildon-desktop called some
 matchbox API directly, that
 maybe some MB APIs could hide the window and the window can not be
 shown again with GTK APIs.

No, there are no Matchbox(2) APIs used by applications. (The API is not
even available at all because the libmatchbox2 library is statically
linked to hildon-desktop, so no application is able to dynamically link
to it.)

My guess about your ghost window is that the X window stacking does
not match what the compositor shows on the screen. So it could be a bug
in hildon-desktop, or it could be some unsupported window type (that's
why I asked for xprop and xwininfo outputs).

 I found everything works well with FireFox borwser for Maemo.

That is interesting...  Have you tried the N900 browser in fullscreen
mode, does it work then?

 Here I could give more details about the window lifecycle.
 There's a scim-gtk-panel daemon which will auto start when system startup.
 When the daemon starts, it will create a winodw, and hide it immediately.
 Everytime when the input method need to show the input window, it will send
 command to the daemon to show the input window and move it to the front.
 When the inputing is done and edit field loses the focus, the input window 
 will
 be hidden by calling gtk_widget_hide

This should work if the window is supported by the window manager (to
see that I need the xprop  xwininfo outputs or a test program from
you).

 This design works all right on most of PC Desktop Linux.  As I said,
 it also works
 well for most applications on Maemo, except browser. In the Browser 
 application,
 when the input window is showing, and I click on other places to close
 the window,
 the window won't show again with gtk_widget_show_all.
 
 My current workaround is, when the input window need to be hidden, I
 will destroy
 the window, and next time when it need to be shown, I will create the
 window again.
 With this workaround, it works just OK now. But, the performance is
 much worse than
 before, since creating and destroying the window take longer time.

This workaround should not be necessary. We have many such windows, for
example the Select Connection dialog that you use to select connection
to the Internet.  It sounds like the window type is confusing to the
window manager and it does not behave right in this case.

-Kimmo

 
 Best regards,
 Evan JIANG
 2010/2/12 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  On Sat, 2010-02-06 at 16:53 +0100, ext Evan JIANG wrote:
  Hi all,
 I'm developing an input method for N900.
 The main window is not full screen, and looks like this:
  http://www.evan129.com/wp-content/uploads/2009/12/20091225_d151774f028f00e741aecdywcKr7OnKn.png
 It works well in most of times. But in browser application, it's a
  bit strange.
 
 As you can see, there are some buttons in the panel, users can
  press the buttons to choose the words. In browser application,
  when users pressed the button, the event will go through my window to
  the browser. Then because of the press location is not in the same
  edit field, the edit field will lose the focus.
 
  I may not explained it clearly. Let me give an easier understanding
  example. If the window is in the top of screen, covered the title bar,
  then when I press the button on the left-top
  corner, it will show the application switch window. That means, the
  press event go through my window, and handled by the app swithcer
  button.
 
  What's the output of these commands for your window:
 
  xprop -id your window
  xwininfo -id your window
 
  These command line tools can be found from x11-utils package.
 
  -Kimmo
 
 
  These are the only 2 places I found that could receive my press event.
  But in all other places, I didn't find this happening.
 
  My panel is created with gtk_window_new (GTK_WINDOW_POPUP);
  And the buttons are created by gtk_button_new();. I use
  g_signal_connect to receive the clicked event or
  button-press-event event.
 
  Does anyone have any idea about that?
 
  Best regards,
  Evan JIANG
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Bad Drawable when running hellogl_es2 example

2010-02-15 Thread Kimmo Hämäläinen
On Sun, 2010-02-14 at 11:34 +0100, ext Charles Han wrote:
 Hi all,
 
 I am having issue when running the example hellogl_es2 from QT. The 
 program segment fault on theN900 and showing this error message:
 X Error: BadDrawable (invalid Pixmap or Window Parameter) 9
 Extension: 134 (unknown extension)
 Minor opcode: 4 (unknow request)
 Resource id: 0x3e9
 
 It's an opengl es 2 example. any help?

Where is the source code?

-Kimmo

 
 Thanks
 
 Charles
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Developing virtual keyboard plugin for Maemo 5

2010-02-12 Thread Kimmo Hämäläinen
On Fri, 2010-02-12 at 12:17 +0100, ext Daniel Martin Yerga wrote:
 Hi.
 
 On 12/02/10 09:54, kokilakr kr wrote:
  Hello All,
 
  Thanks for information about out dated documentation.
 
  But I could not find any information, examples or sample virtual keyboard
  based on new framework. And the header file do not contain any alternate
  APIs.
 
  So does this mean we cannot modify system wide virtual keyboard plugin on
  Maemo 5?
 
  Thanks,
 
 
 Yes, we can.
 
 In this bug report [1] you will find the right information.
 
 The examples used to be in [2] (there was even a portrait keyboard), but 
 after the shutdown of the SVN at stage.maemo.org I don't know where the 
 examples are now. I was not be able to find it in gitorious [3]

Yes, we forgot to move this package. I put it to Gitorious now, using
the source package contents:
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-input-method-plugins-example

-Kimmo

 
 [1] https://bugs.maemo.org/show_bug.cgi?id=4178
 [2] 
 https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-input-method-plugins-example/
 [3] http://maemo.gitorious.org/fremantle-hildon-desktop
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Developing virtual keyboard plugin for Maemo 5

2010-02-12 Thread Kimmo Hämäläinen
On Fri, 2010-02-12 at 13:21 +0100, ext kokilakr kr wrote:
 Hello,
 
 But is this the latest example?
 
 The code contains functions which are unsupported in latest SDK,
  hildon_im_ui_button_set_toggle()
  hildon_im_ui_button_set_label()
 
  hildon_im_ui_button_*

Yes, it hasn't been updated after September 2007, it seems :)  I can
give you commit rights if you can do it ;)

-Kimmo

 
 Thanks,
 
 
 2010/2/12 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
 On Fri, 2010-02-12 at 12:17 +0100, ext Daniel Martin Yerga
 wrote:
  Hi.
 
  On 12/02/10 09:54, kokilakr kr wrote:
   Hello All,
  
   Thanks for information about out dated documentation.
  
   But I could not find any information, examples or sample
 virtual keyboard
   based on new framework. And the header file do not contain
 any alternate
   APIs.
  
   So does this mean we cannot modify system wide virtual
 keyboard plugin on
   Maemo 5?
  
   Thanks,
  
 
  Yes, we can.
 
  In this bug report [1] you will find the right information.
 
  The examples used to be in [2] (there was even a portrait
 keyboard), but
  after the shutdown of the SVN at stage.maemo.org I don't
 know where the
  examples are now. I was not be able to find it in gitorious
 [3]
 
 
 Yes, we forgot to move this package. I put it to Gitorious
 now, using
 the source package contents:
 
 http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-input-method-plugins-example
 
 -Kimmo
 
 
 
  [1] https://bugs.maemo.org/show_bug.cgi?id=4178
  [2]
 
 
 https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-input-method-plugins-example/
  [3] http://maemo.gitorious.org/fremantle-hildon-desktop
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-12 Thread Kimmo Hämäläinen
On Fri, 2010-02-12 at 16:30 +0100, ext Thomas Perl wrote:
 2010/2/6 Evan JIANG first...@gmail.com:
  I may not explained it clearly. Let me give an easier understanding
  example. If the window is in the top of screen, covered the title bar,
  then when I press the button on the left-top
  corner, it will show the application switch window. That means, the
  press event go through my window, and handled by the app swithcer
  button.
 
 Maybe calling XSetInputFocus helps here? See this thread:

Nope, XSetInputFocus affects the keyboard input only, not window
stacking order.

-Kimmo

 
 http://sourceforge.net/mailarchive/forum.php?thread_name=c4cd0cc80911291029l282b140fob3288389beabfa39%40mail.gmail.comforum_name=enlightenment-devel
 
 Also:
 
 http://forums.internettablettalk.com/showthread.php?t=36952
 https://bugs.maemo.org/show_bug.cgi?id=6511
 
 HTH.
 
 Thomas
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-12 Thread Kimmo Hämäläinen
On Sat, 2010-02-06 at 16:53 +0100, ext Evan JIANG wrote:
 Hi all,
I'm developing an input method for N900.
The main window is not full screen, and looks like this:
 http://www.evan129.com/wp-content/uploads/2009/12/20091225_d151774f028f00e741aecdywcKr7OnKn.png
It works well in most of times. But in browser application, it's a
 bit strange.
 
As you can see, there are some buttons in the panel, users can
 press the buttons to choose the words. In browser application,
 when users pressed the button, the event will go through my window to
 the browser. Then because of the press location is not in the same
 edit field, the edit field will lose the focus.
 
 I may not explained it clearly. Let me give an easier understanding
 example. If the window is in the top of screen, covered the title bar,
 then when I press the button on the left-top
 corner, it will show the application switch window. That means, the
 press event go through my window, and handled by the app swithcer
 button.

What's the output of these commands for your window:

xprop -id your window
xwininfo -id your window

These command line tools can be found from x11-utils package.

-Kimmo

 
 These are the only 2 places I found that could receive my press event.
 But in all other places, I didn't find this happening.
 
 My panel is created with gtk_window_new (GTK_WINDOW_POPUP);
 And the buttons are created by gtk_button_new();. I use
 g_signal_connect to receive the clicked event or
 button-press-event event.
 
 Does anyone have any idea about that?
 
 Best regards,
 Evan JIANG
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: how to make a splash screen with Qt

2010-02-08 Thread Kimmo Hämäläinen
On Mon, 2010-02-08 at 09:50 +0100, ext ibrahim wrote:
 hello there ;
 
 I was wondering how to make a splash screen for my application using Qt, 
 I found this link : 
 http://wiki.maemo.org/Qt4_Hildon#QSplashScreen_not_fully_compatible_with_Hildon-Desktop
  
 
 telling that it is not compitable with maemo, So, it tried many 
 workarounds (like creating a fullscreen window above my main window, and 
 then hiding it after a while, But it blinks when it hide and the main 
 view of my application is shown minimized when spalsh screen disappears.
 Also tried to make my  main view window's central widget to be a splash 
 screen widget and after a while i replace it with the original  central 
 widget of the main view But it failed too)
 
 So, I wonder if you have any other way/Maemo API to allow a splash 
 screen to be properly shown .

You need to set a window property that tells HD to skip the transitions:

static void set_no_transitions (Display *dpy, Window w)
{
  Atom no_trans;
  int one = 1;
  no_trans = XInternAtom (dpy, _HILDON_WM_ACTION_NO_TRANSITIONS, False);
  XChangeProperty (dpy, w, no_trans,
   XA_CARDINAL, 32, PropModeReplace,
   (unsigned char *)one, 1);
}

--Kimmo

 
 thank you in advance;
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Developing virtual keyboard plugin for Maemo 5

2010-02-08 Thread Kimmo Hämäläinen
On Mon, 2010-02-08 at 14:40 +0100, ext kokilakr kr wrote:
 Hello All,
 
...
 Following documentation
 
 http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Generic_Platform_Components/Extending_Hildon_Input_Methods
 
 says hildon_im_ui_button_set_* APIs are supported. But when verified
 in  header file hildon-im-ui.h there aren't any of the APIs starting
 from  hildon_im_ui_button_set_

This documentation seems out-dated. Some of that API has been removed.
Please report a bug for it to get it updated.

-Kimmo

 
 So does it mean we cannot modify virtual keyboard plugin?
 
 Or are these APIs moved somewhere else?
 
 Please help..
 
 Thanks,
 
 
 -- Forwarded message --
 From: kokilakr kr kokilakr...@gmail.com
 Date: Fri, Feb 5, 2010 at 2:40 PM
 Subject: Change layout of virtual keyboard
 To: maemo-developers@maemo.org
 
 
 
 Hello,
 
 Following link informs Maemo 5 allows us to modify virtual keyboard
 layout.
 
 http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Generic_Platform_Components/Extending_Hildon_Input_Methods
 
 Just wanted to know can we replace the system (default) virtual
 keyboard? (i.e. I want to display my custom keyboard system wide).
 
 Thanks in advance
 
 
 
 
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Problems Starting Application Framework

2010-02-01 Thread Kimmo Hämäläinen
On Sat, 2010-01-30 at 18:38 +0100, ext ac...@dsic.upv.es wrote:
 Hello,
 
 I am trying to compile the gtk-helloworld from the documentation of  
 the SDK and when executing the next command:
 
 af-sb-init.sh start
 
 receive the next message:
 
 Note: For remote X connections DISPLAY should contain hostname!
 Sample files present.
 DBUS system bus is already running, doing nothing
 D-BUS session bus daemon is already running, doing nothing

Try killing all D-Bus daemons before running the script. It looks like
it fails to start the session bus, at least.

-Kimmo

 Starting Maemo Launcher: maemo-launcher.
 defender: died my parent is not who he claims to be
 Sapwood image server is already running, doing nothing
 gconftool-2[14769]: GLIB WARNING ** GConf - Client failed to connect  
 to the D-BUS daemon:
 Did not receive a reply. Possible causes include: the remote  
 application did not send a reply, the message bus security policy  
 blocked the reply, the reply timeout expired, or the network  
 connection was broken.
 Error setting value: No D-BUS daemon running
 gconftool-2[14771]: GLIB WARNING ** GConf - Client failed to connect  
 to the D-BUS daemon:
 Did not receive a reply. Possible causes include: the remote  
 application did not send a reply, the message bus security policy  
 blocked the reply, the reply timeout expired, or the network  
 connection was broken.
 Error setting value: No D-BUS daemon running
 
 
 I have no idea how try to solve it.
 
 Does someone could help me, please.
 
 Thanks,
 
 A. Cano
 
 
 This message was sent using IMP, the Internet Messaging Program.
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to capture ALL key events, no focus/No-GUI

2010-01-28 Thread Kimmo Hämäläinen
On Thu, 2010-01-28 at 10:53 +0100, ext Stefan Iwanowitsch wrote:
 Rémi Denis-Courmont schrieb:
...

 I want normal processing of keyboard events and just want to trigger
 actions upon certain key combinations/sequences.
 According to the documentation XGrabKeyboard() seems to prevent further
 processing in other applications and there is no easy way to re-enqueue
 key events I'm not interested in.

So you want keyboard shortcuts? Like shift+ctrl+p and the like?  Then
you should use XGrabKey to grab that key combination only. See
libmatchbox2 sources for code.

Grabbing or monitoring the whole keyboard for a keyboard shortcut is not
the right way...

-Kimmo

  If you just want to see keyboard input, then you'd open the corresponding 
  file(s) in /dev/input/.
 

 Can I read from /dev/input without interfering with other consumers? And
 do you happen to know, where I can find specs on the input device files?
 
 Thanks!
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: running application automatically at system startup

2010-01-18 Thread Kimmo Hämäläinen
On Sun, 2010-01-17 at 08:47 +0100, ext ibrahim wrote:
 cheers;
 
 I wonder how to make my application run automatically at system startup. 
 I've read about many ways to do so ( different ways for different  linux 
 distributions) but I'm not sure which way is the right one. I don't want 
 to mess things up by using an inappropriate way.
 So, is there any way to make my (console)app run automatically  when the 
 phone starts??

You can do that by installing a startup script under
the /etc/X11/Xsession.post directory (see scripts there for examples).

-Kimmo

 
 thanks in advance
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Programmatically showing the desktop in Fremantle

2010-01-18 Thread Kimmo Hämäläinen
On Thu, 2010-01-14 at 23:56 +0100, ext Matan Ziv-Av wrote:
 On Thu, 14 Jan 2010, obb770 wrote:
...
 There is no way equivalent to exit_app_view, but in a modified 
 hildon-desktop I am working on, I add a similar dbus signal for 
 selecting any of the desktop modes. See here for details:
 
 http://talk.maemo.org/showthread.php?t=38314
 
 I'll use this thread for a question regarding hildon-desktop. Where is 
 hildon-desktop developed? In other words If I want a patch to be 
 included in hildon-desktop, whom should I contact?

If more and more applications will start controlling the desktop state,
it could lead to unpredictable behaviour and/or chaos, so I'm not very
fond of that.  The desktop UI and its transitions works as they were
specified by UI and interaction experts.

If you want the switcher to ignore your application, please try using
_NET_WM_STATE_SKIP_PAGER. See
http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2552903
for more information.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Programmatically showing the desktop in Fremantle

2010-01-18 Thread Kimmo Hämäläinen
On Mon, 2010-01-18 at 12:10 +0100, Hamalainen Kimmo (Nokia-D/Helsinki)
wrote:
 On Thu, 2010-01-14 at 23:56 +0100, ext Matan Ziv-Av wrote:
  On Thu, 14 Jan 2010, obb770 wrote:
 ...
  There is no way equivalent to exit_app_view, but in a modified 
  hildon-desktop I am working on, I add a similar dbus signal for 
  selecting any of the desktop modes. See here for details:
  
  http://talk.maemo.org/showthread.php?t=38314
  
  I'll use this thread for a question regarding hildon-desktop. Where is 
  hildon-desktop developed? In other words If I want a patch to be 
  included in hildon-desktop, whom should I contact?
 
 If more and more applications will start controlling the desktop state,
 it could lead to unpredictable behaviour and/or chaos, so I'm not very
 fond of that.  The desktop UI and its transitions works as they were
 specified by UI and interaction experts.
 
 If you want the switcher to ignore your application, please try using
 _NET_WM_STATE_SKIP_PAGER. See

Sorry, I meant _NET_WM_STATE_SKIP_TASKBAR...

 http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2552903
 for more information.
 
 -Kimmo
 
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Hildon-Desktop: added Widget not shown

2010-01-13 Thread Kimmo Hämäläinen
On Wed, 2010-01-13 at 01:09 +0100, ext Anderson Lizardo wrote:
 On Tue, Jan 12, 2010 at 6:06 PM, Brent Chiodo bchi...@gmail.com wrote:
  I have had this issue reported for TouchSearch in both forums and formally
  as bug #6264: https://bugs.maemo.org/show_bug.cgi?id=6264
 
 Thanks, it is now easier to try to reproduce it (I have a spare N900
 that can be reflashed).
 
  It was also my thought that the Python - HildonDesktop interface is
  responsible for this.
 
 A possibility is that the the just installed Python loader
 (/usr/lib/hildon-desktop/loaders/libpythonpluginloader.so) only
 becomes active when hildon-desktop is restarted (which I suppose only
 occurs when the device is rebooted).

Notice that hildon-desktop does not have any plugins, all plugins are in
hildon-home. What you need is killall hildon-home -- it will restart
automatically and no reboot is needed.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Drag Drop on GTK + Maemo 5 (was: Re: [pymaemo] DnD on N900)

2010-01-13 Thread Kimmo Hämäläinen
On Wed, 2010-01-13 at 00:03 +0100, ext Jeffrey Barish wrote:
 Claudio Saavedra wrote:
 
  El mié, 06-01-2010 a las 19:44 -0400, Anderson Lizardo escribió:
  There is no drag 'n drop in Maemo GTK+. This has been deliberately
  disabled.
  
  Claudio
 
 Is there a way to enable drag  drop, ideally on a per-application basis?

Unfortunately not yet. There is a (internal) bug for enabling that.
Maybe maemo.org bug would help to get it fixed.


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Hildon-Desktop: added Widget not shown

2010-01-13 Thread Kimmo Hämäläinen
On Wed, 2010-01-13 at 12:03 +0100, ext Anderson Lizardo wrote:
 2010/1/13 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  Notice that hildon-desktop does not have any plugins, all plugins are in
  hildon-home. What you need is killall hildon-home -- it will restart
  automatically and no reboot is needed.
 
 That's good to know. So does that mean we can put this on a postinst
 script and it will not affect running applications and other C
 applets?

It's better to fix hildon-home so that it does not require a restart.
Report a bug and attach your patch there :)

 
 Thanks,

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: hardware keyboard open event

2010-01-12 Thread Kimmo Hämäläinen
On Mon, 2010-01-11 at 18:51 +0100, ext Matan Ziv-Av wrote:
 On Mon, 11 Jan 2010, Neal H. Walfield wrote:
 
  In an application I'm working on, I'd like to show the search tool bar
  if the user opens the hardware keyboard.  Is there a way to detect
  this?  I've tried searching but have had no success; perhaps I'm using
  the wrong keywords.
 
 Run the command
 
 dbus-monitor --system
 
 And open the keyboard while watching the output.

The D-Bus messages are part of the internal protocol between libhal and
the HAL daemon, it's better to use libhal or the Gconf key.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: gtk clutter tearing

2010-01-12 Thread Kimmo Hämäläinen
On Mon, 2010-01-11 at 18:58 +0100, Tamminen Eero (Nokia-D/Helsinki)
wrote:
 Hi,
 
 ext Frantisek Dufka wrote:
  Recent
  hildon-desktop versions disable compositing automatically for fullscreen
  windows, unless you use HildonStackableWindow (which requires the
  sliding animation).
  
  I wonder what happens to translucent information messages (charger 
  attached/removed, ...) in fullscreen SDL applications, are these not 
  shown when compositing is off or are they done in different way and 
  still shown?
 
 hildon-desktop automatically switches to composited mode when needed.
 
 (Making this transition without a temporary user visible visual
 glitch, has taken quite a bit of effort, AFAIK including fixes to
 upstream X server too.)

Yes, Daniel Stone did an impressive job to get this to work. We can
switch between compositing/non-compositing mode without requiring the
applications to repaint their windows.

-Kimmo

 
 
   - Eero
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: hardware keyboard open event

2010-01-12 Thread Kimmo Hämäläinen
On Mon, 2010-01-11 at 22:07 +0100, ext Joaquim Rocha wrote:
 Hi Neal,
 
 The physical keyboard opening/closing changes the GConf key
 /system/osso/af/slide-open. All you need to do is to listen to this
 key and call your code.

Yes, or use libhal to get it from HAL directly. (Run lshal -m while
you open and close the slider to discover the related properties.)

-Kimmo

 
 --
 Joaquim Rocha
 
 Neal H. Walfield wrote:
  Hi,
  
  In an application I'm working on, I'd like to show the search tool bar
  if the user opens the hardware keyboard.  Is there a way to detect
  this?  I've tried searching but have had no success; perhaps I'm using
  the wrong keywords.
  
  Thanks,
  
  Neal
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Creating gconf keys upon installation

2010-01-12 Thread Kimmo Hämäläinen
On Tue, 2010-01-12 at 11:02 +0100, ext Thomas Wälti wrote:
 Just add some gconftool-2 commands to your postinstall script.
 (e.g. gconftool-2 --set /path/to/your/key --type string myvalue)
 

This is not a good way, since the Gconf database could be restored from
an old backup (or a power failure could occur) and you would lose these
values. The better way is to use a Gconf schema with default values,
because that stays even if the values are unset.

-Kimmo

 -Tom
 
 
 On Tue, Jan 12, 2010 at 10:02, Salvatore Iovene salvat...@iovene.com wrote:
  Hello,
  can anyone address me to the simplest way to create some gconf keys upon
  a programs installation?
 
  Thanks in advance,
   Salvatore.
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: HildonRemoteTexture tearing/flicker

2010-01-12 Thread Kimmo Hämäläinen
On Tue, 2010-01-12 at 14:47 +0100, ext Javier S. Pedro wrote:
 Hi all,
 
 I am doing some experiments on using HildonRemoteTexture from a bare
 X11/SDL app -- basically to get sgx accelerated scaling in apps that
 wouldn't otherwise use the sgx for anything else. It works, but there
 seems to be some race condition where the compositor is reading the
 shared memory area _before_ I send the damage client event to the
 remote texture X window. This of course cause visible tearing or even
 flicker if the texture is drawn while (for example) the SNES emulator
 is just in the middle of rendering any of the background layers, which
 tends to happen often depending on CPU load / framerate.

Hmm, I see that the remote texture should update on its own damage
ClientMessage, but I don't see where the normal damage handling (for
XDamage) ignores remote textures. Maybe we are handling the normal X
damage events for your window also -- that would explain if it gets
updated before you have sent the magic ClientMessage.

 Note I'm using HildonRemoteTexture instead of AnimationActor because I
 need no rotation nor any of the actor features and using H-R-T is
 slightly simpler -- no need to use any of the MIT-SHM functions. But I
 have to wonder, seeing how the H-R-T API is falling behind if it is
 going to be deprecated in the future.

It's going to be valid in Fremantle but most probably not in Harmattan,
because applications are more OpenGL-oriented there.

 Feel free to comment on whether this is a good approach or not, too.
 
 Eero wrote:
  hildon-desktop automatically switches to composited mode when needed.
 
 Hopefully this includes having a child animation actor / remote texture :)

Please use the git HEAD of hildon-desktop, libmatchbox2 and clutter0.8
to make sure... :)

-Kimmo

 
 Javier.
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: HildonRemoteTexture tearing/flicker

2010-01-12 Thread Kimmo Hämäläinen
On Tue, 2010-01-12 at 15:30 +0100, Hamalainen Kimmo (Nokia-D/Helsinki)
wrote:
 On Tue, 2010-01-12 at 14:47 +0100, ext Javier S. Pedro wrote:
  Hi all,
...
 Please use the git HEAD of hildon-desktop, libmatchbox2 and clutter0.8
 to make sure... :)

I checked that Image Viewer is not using remote texture at all, so the
implementation could easily break by accident. Therefore you should
indeed check the git version or use animation actor instead.

-Kimmo

 
 -Kimmo
 
  
  Javier.
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Debugging applet causing hildon-home crash

2010-01-11 Thread Kimmo Hämäläinen
On Mon, 2010-01-11 at 02:03 +0100, ext Graham Cobb wrote:
 On Sunday 10 January 2010 19:50:20 Graham Cobb wrote:
  Now to try to work out why my widget cannot receive any click events but
  other widgets can!
 
 Well, it turns out it is because the buttons I want to click on in my home 
 page applet are within a GtkScrolledWindow.  I can receive the clicks if I 
 get rid of the scrolled window (but, not everything fits).  Does anyone know 

This could be fixed in the latest (git master) hildon-desktop. I noticed
that the mouse event forwarding didn't cope well with deep widget
hierarchies.

 if it would work if I used a HildonPannableArea (I won't get a chance to try 
 it until next weekend)?

If you could e-mail me (or attach to a bug) your applet, I can test if
it works in the future.

-Kimmo

 
 Graham
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Smooth animation

2010-01-08 Thread Kimmo Hämäläinen
On Wed, 2009-12-30 at 10:46 +0100, ext Mark Clarkson wrote:
 Hi, I am writing an app for the n900 which requires smooth animation
  within a subwindow. I want to retain the top toolbar and make use of
  hildon's themed widgets - I want to keep, as much as possible, the
  maemo 5 look and feel.

By top toolbar you mean the menu/title bar and close button?

 I have tried cairo animation and clutter (bug #7459), neither of which 
 provide smooth tear/flicker free animation.
 
 As a beginner maemo developer, excited with the possibilities of this new 
 device, is there a way to achieve this goal?

We don't have vsync (unless you use OpenGL directly and enable it
yourself and disable the compositor [which is not using it]), so the
best you can do is to:

1) try to render every frame so that it's all contained in one damage
event (so that the compositor will do it all in one OpenGL update).
2) try to render every frame as fast as possible to keep animations
smooth.

The xresponse utility is a good tool to see how long the screen updates
take and how many damage events are generated for the compositor.

This is easier to do in a fullscreen application because then you can
disable the compositor and draw to the screen directly (which allows for
better FPS, and damage events do not matter anymore).

-Kimmo

 
 Cheers
 Mark.
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: gtk clutter tearing

2010-01-08 Thread Kimmo Hämäläinen
On Tue, 2009-12-29 at 16:17 +0100, Tamminen Eero (Nokia-D/Helsinki)
wrote:
 Hi,
 
 ext Mark Clarkson wrote:
  I have made a simple animation using a clutter timeline with 
  clutter-gtk-0.10 and clutter-1.0 but there is excessive tearing when the 
  animation plays making the animation look terrible.
  
  I have tried none, dri and glx values for the CLUTTER_VBLANK environment 
  variable but this seems to have no effect at all.
  
  Is there a way to fix this?
 
 Screen update isn't yet synched to LCD refresh.  Please file a bug about
 it to bugs.maemo.org (it needs support from kernel display driver, X
 server, SGX driver, Clutter and hildon-desktop compositor, but I guess
 you could file it against Official platform - Core - X).

Don't hold your breath with this one. At the moment it seems a proper
vsync support is not going to be implemented in Maemo 5. There is a
possibility to use a vsync even now, but the implementation is not good
enough: if you enable the current vsync, the OpenGL application is
blocked on glSwapBuffers until vsync comes, which prevents the
application to prepare the next frame (and drops FPS too low).

I think doing like Bounce does is the best you can do: use fullscreen
window and disable the compositor (in hildon-desktop). Recent
hildon-desktop versions disable compositing automatically for fullscreen
windows, unless you use HildonStackableWindow (which requires the
sliding animation).

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to access geotag information?

2010-01-08 Thread Kimmo Hämäläinen
On Thu, 2010-01-07 at 20:50 +0100, ext Till Harbaum / Lists wrote:
 Hi,

  I think you need to re-think what your goal is. That's sad as it
  really limits the usage of geotags. The right solution would sure be
  to let tracker handle this as it's the purpose of tracker to index the
  disk for media files and to provide meta information to all apps
  interested in this.

Yes, tracker should do it. Fortunately, tracker can be extended to index
all kind of information. CC'ing Ivan Mr. Tracker Frade here...

-Kimmo

 
   Till
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Disabling Desktop Notifications

2010-01-07 Thread Kimmo Hämäläinen
On Wed, 2010-01-06 at 01:06 +0100, ext dc101 wrote:
 Hi all,
 
 
 
 Is it possible to disable the connection notifications when the device
 boots up? The notifications I am interested in disabling are:
 -When the device is connected to DUMMY automatically (Connected to
 dummy)
 -When the device is looking to connect to phone (Searching for
 phone...)
 -When the device failed to connect to any phones (Could not find
 phone)
 
 
 I understand that all the notifications are called to the Notification
 D-Bus Service, and it's probably not possible to disable certain
 notifications, but at the very least I'd be happy to know if I can
 turn off the notification d-bus service.

hildon-home is handling the notification service, so you can hack it to
not handle org.freedesktop.Notifications. The code is in Gitorious:

http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-home

However, I think most of the notification are displayed by the
daemons/applications themselves, so you can only rid some of them,
unless you hack the libhildon1 library so that it does not show
infobanners at all.

-Kimmo

 
 
 
 
 Cheers,
 dc101

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Debugging applet causing hildon-home crash

2010-01-07 Thread Kimmo Hämäläinen
On Wed, 2010-01-06 at 22:46 +0100, ext Graham Cobb wrote:
 In Fremantle, the GPE Summary applet causes hildon-home to crash if it is 
 removed and then re-added.  I have not been able to work out what the problem 
 is.

We had several of this kind of crashes that happen when you remove and
add it back. Usually the problem was in the Glib types that the applet
uses: if it tries to register new types that are already there, or
something similar.  I guess Glib should print out some warnings for you?
(notice that hildon-home probably closes stdout by default)

 Any hints on how best to debug this hildon-home crash?

It could help to disable all other plugins than the one that you are
debugging and using gdb or good old printfs I guess.

-Kimmo

 Graham
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Can't debug an application under FREMANTLE_ARMEL target in Scratchbox

2009-11-25 Thread Kimmo Hämäläinen
On Tue, 2009-11-24 at 18:02 +0100, ext Alberto Garcia wrote:
 On Tue, Nov 24, 2009 at 07:55:47PM +0300, Burka Victor wrote:
 
  I'm trying to debug very simple application under FREMANTLE_ARMEL
  target and can't do that.
 
 The armel target is not meant to actually run or debug applications,
 but only to compile them to use in the device.

Yes, this is because Qemu does not completely emulate the ARM processor.
However, if you have a real ARM device, you could set up Scratchbox to
use CPU transparency over network to run the binaries in the real ARM
processor (like we did back in 2004-2005). 

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Debian on the n900 / Configuring NOLO

2009-11-25 Thread Kimmo Hämäläinen
On Thu, 2009-11-26 at 05:10 +0100, ext Christopher Allan Webber wrote:
 Hello all,
 
 I'm interested in exploring installing Debian on the n900.  I assume
 that for the most part, if I loosely follow these instructions:
 http://www.debian.org/releases/stable/arm/apds03.html.en
 
 ... that it may be possible to do so.
 
 However, I realize I need to configure the bootloader to load off the SD
 card.  This is proving a bit hard to do, however, as I cannot find any
 documentation on configuring the NOLO bootloader.  So even if I install
 the system, I don't know how to get it to boot!  :)
 
 Advice on this is appreciated.  (Any other advice to heed while
 exploring this I am receptive to hearing as well...)

Did you try giving it as the kernel command line:
./flasher -broot=/dev/mmcblk1

Didn't work for me, though. It seems the kernel module needed for the
memory cards is not loaded yet.

-Kimmo

 
 Thanks,
  - cwebb
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: independent home screen

2009-11-24 Thread Kimmo Hämäläinen
On Tue, 2009-11-24 at 11:38 +0100, ext Wang Baisheng wrote:
 Hi All,
 
 I want to use an independent home screen which has its own process, not
 contained in the hildon-desktop. And now I have a desktop implemented by
 gtk, but the hildon-desktop will cover it. 

You are talking about Fremantle/N900?  Does your new home screen provide
a window manager also?

-Kimmo

 
 Thanks,
 Baisheng
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: independent home screen

2009-11-24 Thread Kimmo Hämäläinen
On Tue, 2009-11-24 at 15:32 +0100, ext Wang Baisheng wrote:
 在 2009-11-24二的 13:28 +0200,Kimmo Hämäläinen写道:
  On Tue, 2009-11-24 at 11:38 +0100, ext Wang Baisheng wrote:
   Hi All,
   
   I want to use an independent home screen which has its own process, not
   contained in the hildon-desktop. And now I have a desktop implemented by
   gtk, but the hildon-desktop will cover it. 
  
  You are talking about Fremantle/N900?  Does your new home screen provide
  a window manager also?
 
 Yes. No. I just want to let the hildon-desktop provide the window
 manager.

Which parts of hildon-desktop you want to replace, task
switcher/launcher?  It's going to be a huge hacking task if you want to
make hildon-desktop as WM only.  Probably it's easier to use matchbox-
window-manager 1 or try to fix libmatchbox2 so that you can compile it
as stand-alone WM.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: a bug of maemo5 clutter-0.8 on X86 Xephyr ?

2009-11-23 Thread Kimmo Hämäläinen
On Mon, 2009-11-23 at 03:44 +0100, ext bocheng cheng wrote:
 Hi: 
 After I compile  some hildon component on the X86  .
 
 I run the hildon-desktop on Xephyr .There are some rasters on the
 window when I run some applications such as xterm

Are you running Xephyr with -screen 800x480x16 (16-bit) command line
option? 

 Than I kill hildon-desktop .  I just run the xterm  and pass the
 window ID of the xterm 
 to a program called test-pixmap under  the dirctory of  test in the
 clutter source code  .
 It just  turn the pixmap  to cluttertexture and show it .
 the result of test-pixmap  wid  (which is the ID of xterm), It still
 has the raster on it.
 
 So  maybe it is a bug of clutter0.8 about X11 pixmap . 
 
 Any suggestion is welcomes.
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Custom URL handlers not working on Fremantle

2009-11-20 Thread Kimmo Hämäläinen
On Thu, 2009-11-19 at 20:47 +0100, ext Cornelius Hald wrote:
 Hi,
 
 has something changed in the mime/url handling between Diablo and
 Fremantle? It's not working for me anymore and I cannot find
 documentation about changes.
 
 I've registered Conboy as url handler for conboy:// urls. On Diablo it
 is working, but the same code and .desktop file is not working on
 Fremantle anymore.
 
 If I click on a conboy:// link in the Fremantle browser nothing happens.

I think the change is in the browser, please make a bug.

-Kimmo

 There should be a DBus message, but it's not there. Somehow it
 recognizes the url handler in the .desktop file, because if I delete it
 or enter bugus values I get a message from the browser that conboy://
 urls are not supported.
 
 I have tried using the old[1] and the new[2] format, but without
 success.
 
 After that I tried to change the modest.desktop file to call Conboy for
 mailto urls. That worked. Then I changed it to open Modest for conboy://
 urls. That did again not work.
 
 After some more experiments I found out, that if I add
 conboy=hildon-conboy.desktop
 to /usr/share/applications/uri-action-defaults.list it works.
 
 So to me it looks like there is a bug which causes all non-default urls
 to be ignored.
 
 If no one is aware of any changes that could cause this behavior, I'll
 file a bug. But hopefully I'm just just missing something...
 
 Cheers!
 Conny
 
 
 [1] http://wiki.maemo.org/URL_Handler/API_rev1
 [2] http://wiki.maemo.org/URL_Handler/API_rev2
 
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Bug#6203, rotation and OHMD

2009-11-19 Thread Kimmo Hämäläinen
On Wed, 2009-11-18 at 17:23 +0100, ext Martin Grimme wrote:
 How about another XAtom (since we already have so many on Maemo ;) )
 on the application window, saying I rotate well and quickly. ?
 
 The ohmd could take care of this atom and refrain from freezing the
 app during rotation, iff it is the currently visible one.

It's much simpler to just not freeze the application that is being
rotated.  This allows it to redraw for the new screen dimensions _while_
we are showing the rotating animation.  Currently the ohmd freezing is
breaking this for others than the Phone application (it seems those guys
didn't understand what is happening), but it will be fixed.

-Kimmo

 
 Of course applications could lie about their rotation capabilities,
 but that's what we have the extras-testing QA for.
 
 
 Martin
 
 
 2009/11/18, Eero Tamminen eero.tammi...@nokia.com:
  Hi,
 
  ext Eugene Antimirov wrote:
  It handles also audio policies and tries to make sure that you get
  your phone calls when the device is heavily loaded and some other
  minor things.
 
  Just to know.
   
  I see now this `ohmd` process in my 41-10. I did not get it, was this
  daemon improved or made worse in new firmware released lately?
 
  Better for known (pre-installed) applications, worse for unknown
  applications.  The reason for this is that unknown applications have
  unknown resource usage so system policy treats them with more care.
 
 
  It's a bit of a chicken and egg problem.  Changing the policy is slow
  iterative work requiring lots of testing that the policy change doesn't
  significantly worsen other use-cases in some situations (e.g. for things
  for which there are certain certification  legal requirements).
 
  Developers can now experiment and report/discuss things which they would
  like policy to handle better (for certain classes of 3rd applications
  and their use-cases). I.e. in regards to 3rd party applications, the
  policies could be considered work-in-progress.
 
 
  Things that could potentially be done for 3rd party applications
  policy handling:
 
  - Default policy is improved in regards to unknown processes.
 It's yet unknown whether this can be done well enough without
 sacrificing the known functionality, that's why feedback is needed
 on the behavior of 3rd party application use-cases.
 
  - Applications themselves specify the required policy on install.
 This is extra work for apps, and requires extensive testing to
 guarantee that the policy they choose is good match for
 the application in all cases. (application doesn't leak or
 otherwise hog resources)
 
  - Some way for user to specify per-application policy.
 I'm sure power-users would like that... :-)
 
 
  - Eero
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Bug#6203, rotation and OHMD

2009-11-19 Thread Kimmo Hämäläinen
On Wed, 2009-11-18 at 17:44 +0100, ext Cornelius Hald wrote:
 I see many use cases for those policies like an incoming phone call
 should work properly even while some app is doing heavy number
 crunching.
 
 However rotation is a different thing. I mean what's the objective? The
 rotation animation should be smooth even if something uses a lot of
 processing time? Fair enough. But pausing the _foreground_ application
 is hardly the solution. How about pausing all _background_ applications?

You are right. This is the bug :)

-Kimmo

 
 The foreground application is the only application interested in the
 rotation. Therefore it already specifies explicitly that it can rotate.
 If I now write an application it's my duty to give the CPU some time
 while rotating. If I don't do this, _my_ application looks shitty and
 everyone will tell me. It's not the platform that gets a bad reputation,
 it's my app.
 
 So, if anything should get paused, it's all applications which are not
 white listed and which are not in the foreground.
 
 If I somehow missed the point, please tell me :)
 
 Cheers!
 Conny
 
 
 On Wed, 2009-11-18 at 18:07 +0200, Eero Tamminen wrote:
  Hi,
  
  ext Eugene Antimirov wrote:
   It handles also audio policies and tries to make sure that you get
   your phone calls when the device is heavily loaded and some other
   minor things.
   
   Just to know.
   
   I see now this `ohmd` process in my 41-10. I did not get it, was this
   daemon improved or made worse in new firmware released lately?
  
  Better for known (pre-installed) applications, worse for unknown
  applications.  The reason for this is that unknown applications have
  unknown resource usage so system policy treats them with more care.
  
  
  It's a bit of a chicken and egg problem.  Changing the policy is slow
  iterative work requiring lots of testing that the policy change doesn't
  significantly worsen other use-cases in some situations (e.g. for things
  for which there are certain certification  legal requirements).
  
  Developers can now experiment and report/discuss things which they would
  like policy to handle better (for certain classes of 3rd applications
  and their use-cases). I.e. in regards to 3rd party applications, the
  policies could be considered work-in-progress.
  
  
  Things that could potentially be done for 3rd party applications
  policy handling:
  
  - Default policy is improved in regards to unknown processes.
 It's yet unknown whether this can be done well enough without
 sacrificing the known functionality, that's why feedback is needed
 on the behavior of 3rd party application use-cases.
  
  - Applications themselves specify the required policy on install.
 This is extra work for apps, and requires extensive testing to
 guarantee that the policy they choose is good match for
 the application in all cases. (application doesn't leak or
 otherwise hog resources)
  
  - Some way for user to specify per-application policy.
 I'm sure power-users would like that... :-)
  
  
  - Eero
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: how can i change the language of my program during run time?

2009-11-19 Thread Kimmo Hämäläinen
On Thu, 2009-11-19 at 08:51 +0100, ext mohamed ismael wrote:
 how can i change the language of my program during run time?

man setlocale, probably LC_ALL is the one you need to change.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Mapping the N900 keyboard?

2009-11-19 Thread Kimmo Hämäläinen
On Fri, 2009-11-20 at 06:12 +0100, ext Qole wrote:
 So the problem is that the Maemo 5 WM is broken, according to this: 
 
 http://qt.gitorious.org/+qt-maemo-developers/qt/qt-
 maemo/commit/fbf22e64599b220cf95ca90d27d0eb6cdeaa91fe 
 
 Shouldn't there be a bug for this? 

I didn't know about that kind of comment :)  Typical that teams don't
ask the WM maintainer (me) about it.

Actually the N900 is not a desktop PC, as you might have noticed, so we
have a bit different focus logic.  We avoid setting focus to windows
unless they specifically request it, this is to avoid needless wake-ups
in processes (and thus power consumption and often window drawing).  It
works surprisingly well (except for xev maybe).

About dsmetool: it's just a tool that we use to tell the dsme daemon
that this process should be started as user X, nice level N, restarted K
times if it crashes, etc.

XSetInputFocus is the libx11 call that tells the X server to move
(keyboard) input focus to the window given as the argument.  The WM
calls that function to give focus to application windows, depending on
ICCCM guidelines and our own model (ICCCM allows the WM some freedoms).

-Kimmo

 - Original message - 
  On Mon, 2009-11-16 at 08:39 +0100, ext Faheem Pervez wrote: 
   On 11/16/09, Kimmo Hämäläinen kimmo.hamalai...@nokia.com wrote: 
On Mon, 2009-11-16 at 02:03 +0100, ext Qole wrote: 
 I am still hoping for some more help with remapping the N900
 keyboard 
 (see quoted message below). 
 
 I have come across a problem I believe is related, and it is
 much more 
 urgent for me to identify and fix the problem. 
 
 When I start a nested Xephyr X Server on the N900, the
 desktop 
 environment that I run in that X Server (LXDE, on DISPLAY :1)
 does not 
 seem to have access to the keyboard. No keyboard presses are
 passed to 
 DISPLAY :1 at all. When I press the key combination to get to
 the 
 Dashboard (CTRL-Backspace), I am taken to the Dashboard,
 which 
 suggests that maybe Hildon desktop is not letting go of the 
 keyboard. 

hildon-desktop does not ever grab the keyboard. It only grabs
 some 
specific key combinations, such as that ctrl+backspace. 

 I have tried using xkbcomp as described below to copy the
 keyboard 
 mapping to display :1, but it doesn't help. 

Does 'xev' report any key events? 

   
   xev won't work on the N900 by default for exactly the same reason 
   qole's LXDE stuff isn't working: 
   https://bugs.maemo.org/show_bug.cgi?id=5987 
  
  Seems to work after: 
  1) dsmetool -k /usr/bin/hildon-desktop 
  2) xev  
  3) tap on the xev window 
  
  Or you could device a diabolical utility program that calls 
  XSetInputFocus for the xev window... 
  
-Kimmo 

   
   Best Regards, 
   Faheem 
 
 Any help or suggestions? 
 
 On Tue, Nov 10, 2009 at 9:23 PM, Qole qole.tab...@gmail.com
 wrote: 
Now that the N900 has been released, I will
 post this question 
on maemo-developers, in the hopes that some
 Nokia devs can 
help me here. 
 
I would like to know how to remap the keyboard
 on the N900. 
I've received some help from Marius Gedminas,
 as you will see 
below, but I'd like to know how to map the
 keyboard 
permanently, without having to run xkbcomp
 every time. 
 
Here is the help that I've received so far: 
 
On Sun, Oct 25, 2009 at 4:23 AM, Marius
 Gedminas 
mar...@pov.lt wrote: 
 
 
 
I've had partial success by
 doing this: 
 
  $ xkbcomp :0 default.xkb 
  $ vi default.xkb 
 
comment out the two rules that
 cause syntax errors: 
 
//  interpret AccessX_Enable
 +AnyOfOrNone(all) { 
//  action=
 LockControls(controls=); 
//  }; 
 
//  interpret
 MouseKeys_Accel_Enable+AnyOfOrNone(all) 
{ 
//  action=
 LockControls(controls=); 
//  }; 
 
Now you can restore the
 settings back by running 
 
  $ xkbcmp default.xkb :0 
 
if you screw up and end up with
 a nonfunctional 
keyboard. 
 
Next 
 
  $ cp default.xkb mg.xkb 
  $ vi mg.xkb 
 
  key RGHT

Re: how to create a desktop applet

2009-11-18 Thread Kimmo Hämäläinen
On Wed, 2009-11-18 at 09:19 +0100, ext ibrahim wrote:
 Kimmo Hämäläinen wrote:
  On Tue, 2009-11-17 at 18:31 +0100, ext ibrahim wrote:

  daniel wilms wrote:
  
  Hi

  I can't seem to find the APIs needed to do such thing.
  where should a look to find something like that?
  
  there is a good tutorial how to do that in the developer guide:
 
  http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets
   
 
 
  Hope that helps,
 
  cheers Daniel
 

  I tried the example, created a debian package out of the output, and 
  installed it on the emulator and the n900 phone. BUT noting happened!
  th eapplication is installed but i can't see the applicatin name in the 
  Add Widget menu from the Desktop menu.
  What am I missing ?? is there anything else i can do to make the home 
  widget visible to the Add widget and the Desktop??
  
 
  I haven't tried that, but libhildondesktop1-examples package has an
  example Home applet that worked for me.  The package should be part of
  the SDK.  The latest source is in the gitorious:
 
  http://maemo.gitorious.org/fremantle-hildon-desktop/libhildondesktop
 
  -Kimmo
 
 
 

 Didn't work either. Maybe there is something wrong with the way i create 
 packages:
 the steps i take to create the package are :
 
1. compile the source and header using gcc inside scratchbox
   * gcc -shared 'pkg-config hildon-1 libhildondesktop-1 --libs
 --cflags' example.c example.h -o output.so
2. create the folder structure : data/usr/lib/ and put the output.so
   file inside it
3. create the folder : data/usr/share/applications/hildon-home and
   put the .desktop file inside it
4. create the DEBIAN/control file and supply the package information
   in it
5. rename the parent folder to : appname-version||
6. |run the command : dpkg-deb --build app-folder|
7. then setup the package to the emulator using dpkg -i packagename.deb
8. in the emulator; press on the upper area of the desktop, and enter
   the desktop menu
9. click on the Desktop menu --- add widget --- didn't find my
   application name in the widgets menu !!!
 
 what's wrong with what i've done ?? can anybody help?

Easier way:

1) git clone git://gitorious.org/fremantle-hildon-
desktop/libhildondesktop.git
(you can do this also outside Scratchbox), or:
1) apt-get source libhildondesktop1

2) cd libhildondesktop
3) dpkg-buildpackage -rfakeroot -b
(this builds the Debian package)
4) copy libhildondesktop1-examples_version_armel.deb to your N900
5) install it as root: dpkg -i libhildondesktop1-
examples_version_armel.deb
(hildon-home should notice the new .desktop file and list it in the
dialog that you use to add applets on the Home view)

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Mapping the N900 keyboard?

2009-11-15 Thread Kimmo Hämäläinen
On Mon, 2009-11-16 at 02:03 +0100, ext Qole wrote:
 I am still hoping for some more help with remapping the N900 keyboard
 (see quoted message below).
 
 I have come across a problem I believe is related, and it is much more
 urgent for me to identify and fix the problem.
 
 When I start a nested Xephyr X Server on the N900, the desktop
 environment that I run in that X Server (LXDE, on DISPLAY :1) does not
 seem to have access to the keyboard. No keyboard presses are passed to
 DISPLAY :1 at all. When I press the key combination to get to the
 Dashboard (CTRL-Backspace), I am taken to the Dashboard, which
 suggests that maybe Hildon desktop is not letting go of the
 keyboard.

hildon-desktop does not ever grab the keyboard. It only grabs some
specific key combinations, such as that ctrl+backspace.

 I have tried using xkbcomp as described below to copy the keyboard
 mapping to display :1, but it doesn't help.

Does 'xev' report any key events?

-Kimmo

 
 Any help or suggestions? 
 
 On Tue, Nov 10, 2009 at 9:23 PM, Qole qole.tab...@gmail.com wrote:
 Now that the N900 has been released, I will post this question
 on maemo-developers, in the hopes that some Nokia devs can
 help me here.
 
 I would like to know how to remap the keyboard on the N900.
 I've received some help from Marius Gedminas, as you will see
 below, but I'd like to know how to map the keyboard
 permanently, without having to run xkbcomp every time.
 
 Here is the help that I've received so far:
 
 On Sun, Oct 25, 2009 at 4:23 AM, Marius Gedminas
 mar...@pov.lt wrote:
 
 
 
 I've had partial success by doing this:
 
  $ xkbcomp :0 default.xkb
  $ vi default.xkb
 
 comment out the two rules that cause syntax errors:
 
 //  interpret AccessX_Enable+AnyOfOrNone(all) {
 //  action= LockControls(controls=);
 //  };
 
 //  interpret MouseKeys_Accel_Enable+AnyOfOrNone(all)
 {
 //  action= LockControls(controls=);
 //  };
 
 Now you can restore the settings back by running
 
  $ xkbcmp default.xkb :0
 
 if you screw up and end up with a nonfunctional
 keyboard.
 
 Next
 
  $ cp default.xkb mg.xkb
  $ vi mg.xkb
 
key RGHT {
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,
 Tab,   Tab ]
};
 
  $ xkbcomp mg.xkb :0
 
 and now Fn+Right arrow is a Tab key.
 
 Sadly I don't know enough about xkbcomp to see if it's
 possible to make
 it load incomplete maps on top of the current
 configuration, just to
 update a few symbols without replicating the full
 configuration.
 
  None of the changes I make
 to /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
  have any effect (yes I reboot after changing the
 file).
 
 
 Maybe the files in /var/cache/xkb contain precompiled
 versions of those?
 
 I'm not adventurous enough to go and start editing
 files in /usr/.
 Although creating a new symbols file in there and
 loading it on top of
 the defaults with setxkbmap ought to maybe work...
 
 Marius Gedminas
 
 (I have already replied with the following:
 
 Replace 
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,   Tab,
 Tab ]
 
 with
type= PC_FN_LEVEL2,
symbols[Group1]= [   Right,   Tab ]
 
 
 and you will retain the ability to highlight text with shift-
 right arrow.)
 
 
 -- 
 enthusiast, n. One whose mind is wholly possessed and heated
 by what engages it; one who is influenced by a peculiar fervor
 of mind; an ardent and imaginative person.
 
 
 
 
 -- 
 enthusiast, n. One whose mind is wholly possessed and heated by what
 engages it; one who is influenced by a peculiar fervor of mind; an
 ardent and imaginative person.

___
maemo-developers 

Re: How to get a transparent GtkWindow (fremantle)

2009-11-13 Thread Kimmo Hämäläinen
On Thu, 2009-11-12 at 17:21 +0100, ext Luca Donaggio wrote:
 Thanks a lot Kimmo!
 
 At least, now I know what's happening!
 Now, what to do to solve the problem? If HildonAppMenu behaves like
 this by design (and if the bug regards only the fact that it is first
 mapped and then unmapped while it shouldn't be mapped at all), is
 there a way to create a floating top level widget on top of a
 HildonWindow or it is somewhat forbidden by the actual implementation?
 I don't want to continue the development in the wrong direction, maybe
 it's better if I stop here and redisign my app to not include the
 offending widget and find another way to present the same
 informations to the user - but let me say that I grew somewhat fond of
 my transparent-overlayed-unobtrusive-image-details-window!

I think the cleanest (and most risk-free) solution is that you create
the transparent window as a child window of the main window right from
the beginning. But I'm not sure how Gtk allows that. Better solution
would be fixing the WM so that it allows rgba in dialogs, but that can
be more work...

-Kimmo

 
 What do you think?
 
 --
 Luca Donaggio
 
 2009/11/11 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
 On Wed, 2009-11-11 at 08:28 +0100, Hamalainen Kimmo (Nokia-
 D/Helsinki)
 wrote:
  On Tue, 2009-11-10 at 16:15 +0100, ext Luca Donaggio wrote:
   I thought it was somewhat related to transparency because
 doing this:
  
   gdk_window_reparent(win-window,gtk_widget_get_window
 (GTK_WIDGET
   (mainwin)),300,200);
  
   makes the HildonAppMenu work again at the price of loosing
 the
   transparency effect (modified code attached).
 
  Reparenting 'win-window' makes it a child of 'mainwin'.
 That is
  completely different ballgame than the original code, which
 keeps 'win-
  window' a top-level window (child of the root).  When the
 window is not
  top-level, it's not managed by the window manager anymore,
 but it could
  also cause something in Gtk/Hildon (at least I have checked
 all places
  deleting windows in hildon-desktop to no avail).
 
 
 Finally I found the reason for hiding the menu!  It's in
 libhildon
 function hildon_app_menu_find_intruder. It thinks that the
 window with
 the This is an RGBA window label is an intruder (such as
 dialog
 etc.) and closes the menu as soon as it is mapped.  This seems
 like a
 bug since the menu should not be mapped in the first place if
 this
 intruder is already there at mapping time.
 
 To summarize: this is libhildon bug and hildon-desktop is
 completely
 innocent (at last...)!  ;)
 
 -Kimmo
 
 
 
  -Kimmo
 
   --
   Luca Donaggio
  
   2009/11/10 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
   On Tue, 2009-11-10 at 14:12 +0100, ext Luca
 Donaggio wrote:
Hi Kimmo,
   
I'm sorry to bother you again, but the problem
 I'm facing is
   not how
to get a transparent window, but that if I
 create such a
   window the
HildonAppMenu of its parent HildonWindow doesn't
 show
   anymore.
I (slightly) modified your code to exemplify my
 situation.
  
  
   Ah, yes, I can see it.  Looks like the menu is
 unmapped
   immediately when
   it is shown. It's weird, I'm not yet sure what
 unmaps it...
Now it
   looks like hildon-desktop is not unmapping it, so
 it could be
   widget
   side problem also. I'll try to find out.
  
   BTW. this problem is not related to the
 transparency: opaque
   window does
   the same.
  
   -Kimmo
  
  
   
   
Thanks for your time,
   
Luca Donaggio
   
2009/11/10 Kimmo Hämäläinen
 kimmo.hamalai...@nokia.com
Hi,
   
Sorry, took some time, I was busy with
 some bug
   fixing...  I
started
with the Home applet example and managed
 to whip up
   a small
example
(attached) that shows a transparent pop-
 up

Re: How to get a transparent GtkWindow (fremantle)

2009-11-13 Thread Kimmo Hämäläinen
On Fri, 2009-11-13 at 10:44 +0100, Hamalainen Kimmo (Nokia-D/Helsinki)
wrote:
 On Thu, 2009-11-12 at 17:21 +0100, ext Luca Donaggio wrote:
  Thanks a lot Kimmo!
  
  At least, now I know what's happening!
  Now, what to do to solve the problem? If HildonAppMenu behaves like
  this by design (and if the bug regards only the fact that it is first
  mapped and then unmapped while it shouldn't be mapped at all), is
  there a way to create a floating top level widget on top of a
  HildonWindow or it is somewhat forbidden by the actual implementation?
  I don't want to continue the development in the wrong direction, maybe
  it's better if I stop here and redisign my app to not include the
  offending widget and find another way to present the same
  informations to the user - but let me say that I grew somewhat fond of
  my transparent-overlayed-unobtrusive-image-details-window!
 
 I think the cleanest (and most risk-free) solution is that you create
 the transparent window as a child window of the main window right from
 the beginning. But I'm not sure how Gtk allows that. Better solution
 would be fixing the WM so that it allows rgba in dialogs, but that can
 be more work...

I checked the WM support: it seems to be just a matter of commenting out
the offending code in mb-wm-client.c.  But if you use a dialog, your
dialog is closed before you can access the application menu, which is
probably what you are trying to do.

-Kimmo

 
 -Kimmo
 
  
  What do you think?
  
  --
  Luca Donaggio
  
  2009/11/11 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
  On Wed, 2009-11-11 at 08:28 +0100, Hamalainen Kimmo (Nokia-
  D/Helsinki)
  wrote:
   On Tue, 2009-11-10 at 16:15 +0100, ext Luca Donaggio wrote:
I thought it was somewhat related to transparency because
  doing this:
   
gdk_window_reparent(win-window,gtk_widget_get_window
  (GTK_WIDGET
(mainwin)),300,200);
   
makes the HildonAppMenu work again at the price of loosing
  the
transparency effect (modified code attached).
  
   Reparenting 'win-window' makes it a child of 'mainwin'.
  That is
   completely different ballgame than the original code, which
  keeps 'win-
   window' a top-level window (child of the root).  When the
  window is not
   top-level, it's not managed by the window manager anymore,
  but it could
   also cause something in Gtk/Hildon (at least I have checked
  all places
   deleting windows in hildon-desktop to no avail).
  
  
  Finally I found the reason for hiding the menu!  It's in
  libhildon
  function hildon_app_menu_find_intruder. It thinks that the
  window with
  the This is an RGBA window label is an intruder (such as
  dialog
  etc.) and closes the menu as soon as it is mapped.  This seems
  like a
  bug since the menu should not be mapped in the first place if
  this
  intruder is already there at mapping time.
  
  To summarize: this is libhildon bug and hildon-desktop is
  completely
  innocent (at last...)!  ;)
  
  -Kimmo
  
  
  
   -Kimmo
  
--
Luca Donaggio
   
2009/11/10 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
On Tue, 2009-11-10 at 14:12 +0100, ext Luca
  Donaggio wrote:
 Hi Kimmo,

 I'm sorry to bother you again, but the problem
  I'm facing is
not how
 to get a transparent window, but that if I
  create such a
window the
 HildonAppMenu of its parent HildonWindow doesn't
  show
anymore.
 I (slightly) modified your code to exemplify my
  situation.
   
   
Ah, yes, I can see it.  Looks like the menu is
  unmapped
immediately when
it is shown. It's weird, I'm not yet sure what
  unmaps it...
 Now it
looks like hildon-desktop is not unmapping it, so
  it could be
widget
side problem also. I'll try to find out.
   
BTW. this problem is not related to the
  transparency: opaque
window does
the same.
   
-Kimmo
   
   


 Thanks for your time,

 Luca Donaggio

 2009/11/10 Kimmo Hämäläinen

Re: How to get a transparent GtkWindow (fremantle)

2009-11-11 Thread Kimmo Hämäläinen
On Wed, 2009-11-11 at 08:28 +0100, Hamalainen Kimmo (Nokia-D/Helsinki)
wrote:
 On Tue, 2009-11-10 at 16:15 +0100, ext Luca Donaggio wrote:
  I thought it was somewhat related to transparency because doing this:
  
  gdk_window_reparent(win-window,gtk_widget_get_window(GTK_WIDGET
  (mainwin)),300,200);
  
  makes the HildonAppMenu work again at the price of loosing the
  transparency effect (modified code attached).
 
 Reparenting 'win-window' makes it a child of 'mainwin'. That is
 completely different ballgame than the original code, which keeps 'win-
 window' a top-level window (child of the root).  When the window is not
 top-level, it's not managed by the window manager anymore, but it could
 also cause something in Gtk/Hildon (at least I have checked all places
 deleting windows in hildon-desktop to no avail).

Finally I found the reason for hiding the menu!  It's in libhildon
function hildon_app_menu_find_intruder. It thinks that the window with
the This is an RGBA window label is an intruder (such as dialog
etc.) and closes the menu as soon as it is mapped.  This seems like a
bug since the menu should not be mapped in the first place if this
intruder is already there at mapping time.

To summarize: this is libhildon bug and hildon-desktop is completely
innocent (at last...)!  ;)

-Kimmo

 
 -Kimmo
 
  --
  Luca Donaggio
  
  2009/11/10 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
  On Tue, 2009-11-10 at 14:12 +0100, ext Luca Donaggio wrote:
   Hi Kimmo,
  
   I'm sorry to bother you again, but the problem I'm facing is
  not how
   to get a transparent window, but that if I create such a
  window the
   HildonAppMenu of its parent HildonWindow doesn't show
  anymore.
   I (slightly) modified your code to exemplify my situation.
  
  
  Ah, yes, I can see it.  Looks like the menu is unmapped
  immediately when
  it is shown. It's weird, I'm not yet sure what unmaps it...
   Now it
  looks like hildon-desktop is not unmapping it, so it could be
  widget
  side problem also. I'll try to find out.
  
  BTW. this problem is not related to the transparency: opaque
  window does
  the same.
  
  -Kimmo
  
  
  
  
   Thanks for your time,
  
   Luca Donaggio
  
   2009/11/10 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
   Hi,
  
   Sorry, took some time, I was busy with some bug
  fixing...  I
   started
   with the Home applet example and managed to whip up
  a small
   example
   (attached) that shows a transparent pop-up window.
  
   -Kimmo
  
  
  
  
  
 
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to get a transparent GtkWindow (fremantle)

2009-11-10 Thread Kimmo Hämäläinen
Hi,

Sorry, took some time, I was busy with some bug fixing...  I started
with the Home applet example and managed to whip up a small example
(attached) that shows a transparent pop-up window.

-Kimmo

/*
 gcc -Wall `pkg-config gtk+-2.0 --cflags --libs` rgba-window-example.c -o rgba-window-example
 */

#include gtk/gtk.h

static gboolean
handle_expose (GtkWidget *widget, GdkEventExpose *event)
{
  cairo_t *cr;

  /* Create cairo context */
  cr = gdk_cairo_create (GDK_DRAWABLE (widget-window));
  gdk_cairo_region (cr, event-region);
  cairo_clip (cr);

  /* Draw alpha background */
  cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
  cairo_set_source_rgba (cr, 0.5, 0.5, 0.5, 0.5);
  cairo_paint (cr);

  /* Free context */
  cairo_destroy (cr);

  return FALSE;
}

int main ()
{
  GtkWidget *win, *label;
  GdkScreen *screen;

  gtk_init (NULL, NULL);

  win = gtk_window_new (GTK_WINDOW_POPUP);
  screen = gtk_widget_get_screen (win);
  gtk_widget_set_colormap (win, gdk_screen_get_rgba_colormap (screen));
  gtk_widget_set_app_paintable (win, TRUE);

  gtk_widget_realize (win);
  gdk_window_set_back_pixmap (win-window, NULL, FALSE);
  gtk_window_move (GTK_WINDOW (win), 300, 200);

  label = gtk_label_new (This is an RGBA window);
  gtk_container_add (GTK_CONTAINER (win), label);

  gtk_widget_show_all (win);

  g_signal_connect (win, expose-event, G_CALLBACK (handle_expose), win);
  gtk_main ();
  return 0;
}

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to get a transparent GtkWindow (fremantle)

2009-11-10 Thread Kimmo Hämäläinen
On Tue, 2009-11-10 at 14:12 +0100, ext Luca Donaggio wrote:
 Hi Kimmo,
 
 I'm sorry to bother you again, but the problem I'm facing is not how
 to get a transparent window, but that if I create such a window the
 HildonAppMenu of its parent HildonWindow doesn't show anymore.
 I (slightly) modified your code to exemplify my situation.

Ah, yes, I can see it.  Looks like the menu is unmapped immediately when
it is shown. It's weird, I'm not yet sure what unmaps it...  Now it
looks like hildon-desktop is not unmapping it, so it could be widget
side problem also. I'll try to find out.

BTW. this problem is not related to the transparency: opaque window does
the same.

-Kimmo

 
 
 Thanks for your time,
 
 Luca Donaggio
 
 2009/11/10 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
 Hi,
 
 Sorry, took some time, I was busy with some bug fixing...  I
 started
 with the Home applet example and managed to whip up a small
 example
 (attached) that shows a transparent pop-up window.
 
 -Kimmo
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to get a transparent GtkWindow (fremantle)

2009-11-10 Thread Kimmo Hämäläinen
On Tue, 2009-11-10 at 16:15 +0100, ext Luca Donaggio wrote:
 I thought it was somewhat related to transparency because doing this:
 
 gdk_window_reparent(win-window,gtk_widget_get_window(GTK_WIDGET
 (mainwin)),300,200);
 
 makes the HildonAppMenu work again at the price of loosing the
 transparency effect (modified code attached).

Reparenting 'win-window' makes it a child of 'mainwin'. That is
completely different ballgame than the original code, which keeps 'win-
window' a top-level window (child of the root).  When the window is not
top-level, it's not managed by the window manager anymore, but it could
also cause something in Gtk/Hildon (at least I have checked all places
deleting windows in hildon-desktop to no avail).

-Kimmo

 --
 Luca Donaggio
 
 2009/11/10 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
 On Tue, 2009-11-10 at 14:12 +0100, ext Luca Donaggio wrote:
  Hi Kimmo,
 
  I'm sorry to bother you again, but the problem I'm facing is
 not how
  to get a transparent window, but that if I create such a
 window the
  HildonAppMenu of its parent HildonWindow doesn't show
 anymore.
  I (slightly) modified your code to exemplify my situation.
 
 
 Ah, yes, I can see it.  Looks like the menu is unmapped
 immediately when
 it is shown. It's weird, I'm not yet sure what unmaps it...
  Now it
 looks like hildon-desktop is not unmapping it, so it could be
 widget
 side problem also. I'll try to find out.
 
 BTW. this problem is not related to the transparency: opaque
 window does
 the same.
 
 -Kimmo
 
 
 
 
  Thanks for your time,
 
  Luca Donaggio
 
  2009/11/10 Kimmo Hämäläinen kimmo.hamalai...@nokia.com
  Hi,
 
  Sorry, took some time, I was busy with some bug
 fixing...  I
  started
  with the Home applet example and managed to whip up
 a small
  example
  (attached) that shows a transparent pop-up window.
 
  -Kimmo
 
 
 
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to get a transparent GtkWindow (fremantle)

2009-11-03 Thread Kimmo Hämäläinen
On Tue, 2009-11-03 at 15:06 +0100, ext Luca Donaggio wrote:
 I'm still banging my head against a wall with this:
 
 why without reparenting the popup undecorated window to the main app
 window it becomes transparent but the app menu doesn't work (it starts
 to be drawn but immediately disappears) and viceversa?

I think this is not the way to go. This is way too hacky and ugly.
Also, the window manager has not been tested for this kind of
reparenting cases (which cause unmaps and remapping of windows), and
it's likely that it's buggy in handling those.

Home applet windows are transparent, so clearly there is some way to do
it depending on the window type.

Do you have a stand-alone program showing transparent dialog (without
reparenting hacks), so I could spend some time to see if it can be made
to work?

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


  1   2   3   >