FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Native cursor support (patch)  (Read 2313 times)

CheeseSucker

  • Developer
  • Newbie
  • *
  • Posts: 26
  • FIFE programmer
    • View Profile
Native cursor support (patch)
« on: May 26, 2009, 04:10:07 pm »

When I was working on resizable windows for the editor, I quickly noticed that there were no real support for native cursors in FIFE. Sometimes native cursors is a better choice than custom cursors, so I made some changes to the cursor class.

Some notes about this patch:
 - Native cursors will work on Windows and X11
 - On X11 systems, another dependency is added: Xcursors
 - On X11, it seems to pick cursors from the default theme. This might be fixable.

Patch: http://fife.pastebin.com/m7cf57be8 (attached patch has a few errors)

To test this patch, apply this diff:
http://fife.pastebin.com/d6841fc47

And run the editor and press 9 to cycle through all the cursors.

What I want to know is:
Does it compile for you?
Does it work?
Are there anything that you don't like about it?

If I don't hear any objections within one week, I will commit it to SVN.
« Last Edit: May 27, 2009, 01:52:33 am by CheeseSucker »
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Native cursor support (patch)
« Reply #1 on: June 09, 2009, 05:17:28 am »

A very late reply to your questions - but hey... ^^

Now that this code is merged into trunk/, I also compiled  your changes on my notebook. And although the xcursor dev libs were installed, I had to adjust one line in linux2-config-dist.py to make the build process work:

(line 27, old)
Code: [Select]
context.checkSimpleLib(['xcursor']);

(line 27, new)
Code: [Select]
context.checkSimpleLib(['xcursor','Xcursor']);

This fix is needed for LinuxMint (Elyssa), your committed code compiles fine on Ubuntu (Gutsy).

Cheers,
chewie