X11: refresh window after xrandr event #848

Closed
wants to merge 20 commits into
from

Conversation

Projects
None yet
6 participants
@FernetMenta
Member

FernetMenta commented Apr 5, 2012

This fixes 2 issues.

Window/scaling was not refreshed when xrandr (issued by user outside of XBMC) has changed mode.

On ATI HD series 2000 menu was scrambled after playback stopped and refresh rate was set back to desktop resolution.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Apr 5, 2012

Member

What in it is it that fixes 2?

Member

elupus commented Apr 5, 2012

What in it is it that fixes 2?

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 5, 2012

Member

It calls g_graphicsContext.SetVideoResolution after the mode switch has completed. This calls ResizeWindow and refreshes the gl context. The issue was reported on ATI HD 2000, 4000, 5000 series. I don't have such a model but was told this has fixed the problem.

Member

FernetMenta commented Apr 5, 2012

It calls g_graphicsContext.SetVideoResolution after the mode switch has completed. This calls ResizeWindow and refreshes the gl context. The issue was reported on ATI HD 2000, 4000, 5000 series. I don't have such a model but was told this has fixed the problem.

@wsnipex

This comment has been minimized.

Show comment Hide comment
@wsnipex

wsnipex Apr 5, 2012

Member

I run a hd 4250 and can confirm that this resolves 2).
without the patch the gui is always completely scrambled and unreadable.

Member

wsnipex commented Apr 5, 2012

I run a hd 4250 and can confirm that this resolves 2).
without the patch the gui is always completely scrambled and unreadable.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Apr 6, 2012

Member

My only hesitance is the include of xrandr stuff in the header file. It will get pulled in pretty much everywhere.

Member

elupus commented Apr 6, 2012

My only hesitance is the include of xrandr stuff in the header file. It will get pulled in pretty much everywhere.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 7, 2012

Member

I removed xrandr from the header. The strategy is that if a user decides to change mode while XBMC is running, this mode becomes our new desktop resolution. So the mode is stored there. Do you agree with this?

Member

FernetMenta commented Apr 7, 2012

I removed xrandr from the header. The strategy is that if a user decides to change mode while XBMC is running, this mode becomes our new desktop resolution. So the mode is stored there. Do you agree with this?

@elupus

View changes

xbmc/windowing/X11/WinSystemX11.cpp
+ XMode mode = g_xrandr.GetCurrentMode(out.name);
+ UpdateDesktopResolution(g_settings.m_ResInfo[RES_DESKTOP], 0, mode.w, mode.h, mode.hz);
+ g_settings.m_ResInfo[RES_DESKTOP].strId = mode.id;
+ g_settings.m_ResInfo[RES_DESKTOP].strOutput = out.name;

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Apr 10, 2012

Member

Hmm.. there is no guarantee current mode is desktop so you can't overwrite it with current mode.

@elupus

elupus Apr 10, 2012

Member

Hmm.. there is no guarantee current mode is desktop so you can't overwrite it with current mode.

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 11, 2012

Member

After a forced query: g_xrandr.Query(true) GetCurrentOutput returns the current resolution. Isn't this desktop resolution?

@FernetMenta

FernetMenta Apr 11, 2012

Member

After a forced query: g_xrandr.Query(true) GetCurrentOutput returns the current resolution. Isn't this desktop resolution?

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Apr 11, 2012

Member

Desktop resolution is the resolution system was at before xbmc started. Ie
what we switch to when going from fullscreen to windowed.

That function can get called when fullscreen. The current Res isn't desktop.

@elupus

elupus Apr 11, 2012

Member

Desktop resolution is the resolution system was at before xbmc started. Ie
what we switch to when going from fullscreen to windowed.

That function can get called when fullscreen. The current Res isn't desktop.

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 11, 2012

Member

That's why I do Query(true) here. After this GetCurrentOutput returns the resolution the user has set to with xrandr. The assumption is that when a user uses xrandr he/she wants this new mode as the desktop resolution. XBMC would then switch to this new mode when going windowed.

@FernetMenta

FernetMenta Apr 11, 2012

Member

That's why I do Query(true) here. After this GetCurrentOutput returns the resolution the user has set to with xrandr. The assumption is that when a user uses xrandr he/she wants this new mode as the desktop resolution. XBMC would then switch to this new mode when going windowed.

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 11, 2012

Member

I think I misunderstood you first comment. The question is should an external xrandr command overwrite the desktop resolution, right? I think so, in particular when using pvr where a user wants to switch frequently between fullscreen and minimized view.

@FernetMenta

FernetMenta Apr 11, 2012

Member

I think I misunderstood you first comment. The question is should an external xrandr command overwrite the desktop resolution, right? I think so, in particular when using pvr where a user wants to switch frequently between fullscreen and minimized view.

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Apr 11, 2012

Member

Hmm.. I see your point.

But maybe we should be checking if we are fullscreen or not instead of the m_internalModeSwitch?

If we are windowed, it should always update desktop resolution. If we are fullscreen it should not, just switch to the new resolution. (you can change rez by xrandr via ssh for example to test it).

@elupus

elupus Apr 11, 2012

Member

Hmm.. I see your point.

But maybe we should be checking if we are fullscreen or not instead of the m_internalModeSwitch?

If we are windowed, it should always update desktop resolution. If we are fullscreen it should not, just switch to the new resolution. (you can change rez by xrandr via ssh for example to test it).

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 11, 2012

Member

Yes, this makes sense. I will change it. Thanks.

@FernetMenta

FernetMenta Apr 11, 2012

Member

Yes, this makes sense. I will change it. Thanks.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 12, 2012

Member

Looks much cleaner now.

Member

FernetMenta commented Apr 12, 2012

Looks much cleaner now.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 17, 2012

Member

@elupus
Do you still see any errors/problems?

Member

FernetMenta commented Apr 17, 2012

@elupus
Do you still see any errors/problems?

@elupus

View changes

xbmc/windowing/X11/WinSystemX11.cpp
OnLostDevice();
g_xrandr.SetMode(out, mode);
}
- else
- g_xrandr.RestoreState();
#endif

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Apr 18, 2012

Member

This is quite different from previous code. When we go to non fullscreen we previously ignored the given resolution parameter and use what had stored. Now it respects the passed resolution. I'm not sure all calls to that function passes a valid resolution when fullscreen is false.

Maybe it should use the data from DESKTOP resolution always in that case?

@elupus

elupus Apr 18, 2012

Member

This is quite different from previous code. When we go to non fullscreen we previously ignored the given resolution parameter and use what had stored. Now it respects the passed resolution. I'm not sure all calls to that function passes a valid resolution when fullscreen is false.

Maybe it should use the data from DESKTOP resolution always in that case?

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 18, 2012

Member

Yes, I was uncertain about this. Changed it to use RES_DESKTOP if not fullscreen.

@FernetMenta

FernetMenta Apr 18, 2012

Member

Yes, I was uncertain about this. Changed it to use RES_DESKTOP if not fullscreen.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Apr 28, 2012

Member

@elupus
Could you have another look on this? I changed:

  • SetFullScreen uses the fullscreen flag again
  • fixed RefreshWindow to work correctly in windowd mode
Member

FernetMenta commented Apr 28, 2012

@elupus
Could you have another look on this? I changed:

  • SetFullScreen uses the fullscreen flag again
  • fixed RefreshWindow to work correctly in windowd mode
+ bool found(false);
+ for (i = RES_DESKTOP; i < g_settings.m_ResInfo.size(); ++i)
+ {
+ if (g_settings.m_ResInfo[i].strId == mode.id)

This comment has been minimized.

Show comment Hide comment
@elupus

elupus May 17, 2012

Member

Doesn't this need to checkout output too?

@elupus

elupus May 17, 2012

Member

Doesn't this need to checkout output too?

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta May 17, 2012

Member

I think your are right. I will rework it.

@FernetMenta

FernetMenta May 17, 2012

Member

I think your are right. I will rework it.

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jun 17, 2012

Member

Still seem to be missing output check.

@elupus

elupus Jun 17, 2012

Member

Still seem to be missing output check.

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jun 17, 2012

Member

Yeah, I need to update the PR. In the meantime I have almost fixed multi-head setups.

@FernetMenta

FernetMenta Jun 17, 2012

Member

Yeah, I need to update the PR. In the meantime I have almost fixed multi-head setups.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus May 17, 2012

Member

@bobo1on1 @theuni @cptspiff i need some comments here.

We are already rather broken on multi display setups, i'd rather not break it furhter.

Member

elupus commented May 17, 2012

@bobo1on1 @theuni @cptspiff i need some comments here.

We are already rather broken on multi display setups, i'd rather not break it furhter.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta May 17, 2012

Member

I am currently working on a closely related topic: SDL prevents rotating the screen left or right. so I have to ditch SDL for X11 video and window events. I think I'll have something for review after the weekend. I would attach it this PR.

Member

FernetMenta commented May 17, 2012

I am currently working on a closely related topic: SDL prevents rotating the screen left or right. so I have to ditch SDL for X11 video and window events. I think I'll have something for review after the weekend. I would attach it this PR.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta May 21, 2012

Member

I updated this pr, rotating screen with xrandr does work now. This required to get rid of SDL for video and events (SDL joystick is still there)

  • in this iteration sdl video can be disabled by configuring with --disable-sdlvideo
    EDIT: the switch is now --enable-sdlx11, which is disabled by default
  • multi-screen setup might not work: I don't have such a setup
  • testing on DARWIN and GLES needs to be done
  • 30d38b2dfdc76b9a76334daa140ee199fb791277 is only temporary for testing
Member

FernetMenta commented May 21, 2012

I updated this pr, rotating screen with xrandr does work now. This required to get rid of SDL for video and events (SDL joystick is still there)

  • in this iteration sdl video can be disabled by configuring with --disable-sdlvideo
    EDIT: the switch is now --enable-sdlx11, which is disabled by default
  • multi-screen setup might not work: I don't have such a setup
  • testing on DARWIN and GLES needs to be done
  • 30d38b2dfdc76b9a76334daa140ee199fb791277 is only temporary for testing
@davilla

This comment has been minimized.

Show comment Hide comment
@davilla

davilla May 23, 2012

Contributor

darwin/osx seems fine and untouched.

this seems a little specific, defining a HAVE_SDL_VIDEO_X11 just for X11 usage when with a little work, HAVE_SDL_VIDEO could be used for all. But I can cleanup/refactor to be more generic after inject. I'll do a patch that does this and you can decide if you want to merge that patch into this pull/req

Contributor

davilla commented May 23, 2012

darwin/osx seems fine and untouched.

this seems a little specific, defining a HAVE_SDL_VIDEO_X11 just for X11 usage when with a little work, HAVE_SDL_VIDEO could be used for all. But I can cleanup/refactor to be more generic after inject. I'll do a patch that does this and you can decide if you want to merge that patch into this pull/req

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta May 23, 2012

Member

You are welcome if you want to invest the time. My idea was getting rid of SDL for X11 in a second round, this would make this macro obsolete. I didn't dare in this round but I see no need for SDL (X11) anymore.

Member

FernetMenta commented May 23, 2012

You are welcome if you want to invest the time. My idea was getting rid of SDL for X11 in a second round, this would make this macro obsolete. I didn't dare in this round but I see no need for SDL (X11) anymore.

@davilla

This comment has been minimized.

Show comment Hide comment
@davilla

davilla May 23, 2012

Contributor

ok, I've added some inline comments that need to get fixed.

Contributor

davilla commented May 23, 2012

ok, I've added some inline comments that need to get fixed.

@davilla

This comment has been minimized.

Show comment Hide comment
@davilla

davilla May 23, 2012

Contributor

pulled again

I see

if test "$use_sdlvideo" = "yes"; then

in configure.in

also see http://pastebin.com/RU5jLf5h

Contributor

davilla commented May 23, 2012

pulled again

I see

if test "$use_sdlvideo" = "yes"; then

in configure.in

also see http://pastebin.com/RU5jLf5h

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta May 24, 2012

Member

@davilla
Not sure what kind of a brain seizure I had yesterday. All your comments turned out to be correct. Check the "squash me" commits.

Member

FernetMenta commented May 24, 2012

@davilla
Not sure what kind of a brain seizure I had yesterday. All your comments turned out to be correct. Check the "squash me" commits.

@davilla

This comment has been minimized.

Show comment Hide comment
@davilla

davilla May 24, 2012

Contributor

ok now :)

Contributor

davilla commented May 24, 2012

ok now :)

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jun 17, 2012

Member

Imho... Can't we just drop the SDL path completely? Less ifdeffery and it's something we have wanted for a long time.

Member

elupus commented Jun 17, 2012

Imho... Can't we just drop the SDL path completely? Less ifdeffery and it's something we have wanted for a long time.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jun 17, 2012

Member

"Can't we just drop the SDL path completely"

Yes will do, with regard on all the other changes I have not merged into this PR it makes no sense maintaining both versions.

Member

FernetMenta commented Jun 17, 2012

"Can't we just drop the SDL path completely"

Yes will do, with regard on all the other changes I have not merged into this PR it makes no sense maintaining both versions.

@theuni

This comment has been minimized.

Show comment Hide comment
@theuni

theuni Jun 17, 2012

Member

agreed.

Member

theuni commented Jun 17, 2012

agreed.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jun 20, 2012

Member

I have update the PR with fixes for multi-monitor setups. Considerations:

On X11 monitors can be configured to be on separate X-screens or to share the same virtual screen. I needed to introduce a new gui settings parameter: Monitor.

Xrandr allows to dynamically add modes, this happens e.g. when a monitor is connected. This raises the need for dynamic updates of resolutions.

TODO:
Calibrations are broken in this branch. The problem is that they are stored with resolutions which may change or even not be available when XBMC is started. Currently all resolutions are saved to guisettings even those which have no calibration changes. This is not ideal. I am looking for a solution which updates a resolution with a stored calibration at the time a relosolution becomes available. Ideas? Should calibrations have their own section in settings and saved instead of resolutions?

Member

FernetMenta commented Jun 20, 2012

I have update the PR with fixes for multi-monitor setups. Considerations:

On X11 monitors can be configured to be on separate X-screens or to share the same virtual screen. I needed to introduce a new gui settings parameter: Monitor.

Xrandr allows to dynamically add modes, this happens e.g. when a monitor is connected. This raises the need for dynamic updates of resolutions.

TODO:
Calibrations are broken in this branch. The problem is that they are stored with resolutions which may change or even not be available when XBMC is started. Currently all resolutions are saved to guisettings even those which have no calibration changes. This is not ideal. I am looking for a solution which updates a resolution with a stored calibration at the time a relosolution becomes available. Ideas? Should calibrations have their own section in settings and saved instead of resolutions?

@davilla

This comment has been minimized.

Show comment Hide comment
@davilla

davilla Jun 21, 2012

Contributor

"On X11 monitors can be configured to be on separate X-screens or to share the same virtual screen. I needed to introduce a new gui settings parameter: Monitor."

icky unless absolutely required. users will constantly misconfigure it then complain when it does exactly what they setup but they failed to understand the ramifications.

What's the 'most common setup' for users and how are we doing it now ? a) separate X-screens or b) share the same virtual screen. I suggest coding for the most common and moving the other to as.xml.

Contributor

davilla commented Jun 21, 2012

"On X11 monitors can be configured to be on separate X-screens or to share the same virtual screen. I needed to introduce a new gui settings parameter: Monitor."

icky unless absolutely required. users will constantly misconfigure it then complain when it does exactly what they setup but they failed to understand the ramifications.

What's the 'most common setup' for users and how are we doing it now ? a) separate X-screens or b) share the same virtual screen. I suggest coding for the most common and moving the other to as.xml.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jun 21, 2012

Member

I think we can't favor a) over b) or vice versa. NVidia currently does not support xrandr 1.3 whereas ATI and Intel do. Secondly I would like to make it most comfortable to the user. In most cases they don't even know what a screen is but they can identify a monitor. Selecting a monitor implicitly identifies the X screen or the output of a virtual screen.

Users can't misconfigure this setting. On startup I check whether the monitor is present. If it is not connected, the output goes to the first connected monitor.

Member

FernetMenta commented Jun 21, 2012

I think we can't favor a) over b) or vice versa. NVidia currently does not support xrandr 1.3 whereas ATI and Intel do. Secondly I would like to make it most comfortable to the user. In most cases they don't even know what a screen is but they can identify a monitor. Selecting a monitor implicitly identifies the X screen or the output of a virtual screen.

Users can't misconfigure this setting. On startup I check whether the monitor is present. If it is not connected, the output goes to the first connected monitor.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jun 21, 2012

Member

@davilla
The parameter Monitor is only for X11
You could do me a favor and have a closer look into 0840d6558d273afe135f880aae89c10535836a9f

Member

FernetMenta commented Jun 21, 2012

@davilla
The parameter Monitor is only for X11
You could do me a favor and have a closer look into 0840d6558d273afe135f880aae89c10535836a9f

@pietheinstrengholt

This comment has been minimized.

Show comment Hide comment
@pietheinstrengholt

pietheinstrengholt Jul 1, 2012

Member

I've tested these patches on my latest xbmcbuntu build. No issues found.

Member

pietheinstrengholt commented Jul 1, 2012

I've tested these patches on my latest xbmcbuntu build. No issues found.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 3, 2012

Member

@bobo1on1 probably should have a look at the ref clock things

@FernetMenta i assume you intend to squash some things together in this series. See some squash comments and some fixes on previous commits. Apart from some things i'm liking the look of it.

Member

elupus commented Jul 3, 2012

@bobo1on1 probably should have a look at the ref clock things

@FernetMenta i assume you intend to squash some things together in this series. See some squash comments and some fixes on previous commits. Apart from some things i'm liking the look of it.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jul 4, 2012

Member

i assume you intend to squash some things together in this series. See some squash comments and some fixes on previous commits. Apart from some things i'm liking the look of it.

Correct. I expect some more changes from the review, then I will finalize the commits.

Member

FernetMenta commented Jul 4, 2012

i assume you intend to squash some things together in this series. See some squash comments and some fixes on previous commits. Apart from some things i'm liking the look of it.

Correct. I expect some more changes from the review, then I will finalize the commits.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 5, 2012

Member

I've started refactoring this series a bit.. Nothing major, mainly squashing things and moving hunks between commits, then i'll try to resolve some of the comments i've made above. Will post a branch later. Just wanted to let you know so we don't do double work.

Member

elupus commented Jul 5, 2012

I've started refactoring this series a bit.. Nothing major, mainly squashing things and moving hunks between commits, then i'll try to resolve some of the comments i've made above. Will post a branch later. Just wanted to let you know so we don't do double work.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 5, 2012

Member

So i've done some restructuring of this series. Split some commits modified some things added some things that should be squashed later: https://github.com/elupus/xbmc/compare/dropsdl

There is not much changed compared to your branch in the final diff: http://paste.ubuntu.com/1076449/ but i've squash some things together and moved hunks between commits to keep it a bit more logical.

I'll probably keep on working on the first parts of this. The SDL -> X11 change, to try to finalize to get in. But would be nice if you could swap over and work on this series as a base instead.

Member

elupus commented Jul 5, 2012

So i've done some restructuring of this series. Split some commits modified some things added some things that should be squashed later: https://github.com/elupus/xbmc/compare/dropsdl

There is not much changed compared to your branch in the final diff: http://paste.ubuntu.com/1076449/ but i've squash some things together and moved hunks between commits to keep it a bit more logical.

I'll probably keep on working on the first parts of this. The SDL -> X11 change, to try to finalize to get in. But would be nice if you could swap over and work on this series as a base instead.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jul 5, 2012

Member

Great, thanks! I will reset my branch to yours later.
I just noticed there's dead code in it. HAS_SDL_VIDEO_X11 does not exist anymore which makes WinSystemX11::CheckDisplayEvents() obsolete. It's a left-over from a previous iteration.

Member

FernetMenta commented Jul 5, 2012

Great, thanks! I will reset my branch to yours later.
I just noticed there's dead code in it. HAS_SDL_VIDEO_X11 does not exist anymore which makes WinSystemX11::CheckDisplayEvents() obsolete. It's a left-over from a previous iteration.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 5, 2012

Member

Ok will drop the code.

Regarding the grabbing of input, i assume you just copied SDL in that
regard. It sadly brakes a least the bahavior of Unity in re-activation
of the window after it has lost focus. I think we should be using
_NET_ACTIVATE_WINDOW if we want to do this on fullscreen.

Member

elupus commented Jul 5, 2012

Ok will drop the code.

Regarding the grabbing of input, i assume you just copied SDL in that
regard. It sadly brakes a least the bahavior of Unity in re-activation
of the window after it has lost focus. I think we should be using
_NET_ACTIVATE_WINDOW if we want to do this on fullscreen.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jul 5, 2012

Member

Right, I started with the SDL code and changed it a bit. The parameters of XGrabPointer are different to allow the mouse leaving fullscreen XBMC. LeaveNotify triggers an ungrab. I agree, this is still ugly and __NET_ACTIVE_WINDOW seems more elegant. Will you do?
Is the current code broken? I have been testing with Unity (mostly 2D) and did not notice.

Member

FernetMenta commented Jul 5, 2012

Right, I started with the SDL code and changed it a bit. The parameters of XGrabPointer are different to allow the mouse leaving fullscreen XBMC. LeaveNotify triggers an ungrab. I agree, this is still ugly and __NET_ACTIVE_WINDOW seems more elegant. Will you do?
Is the current code broken? I have been testing with Unity (mostly 2D) and did not notice.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 5, 2012

Member

Right, I started with the SDL code and changed it a bit. The parameters of XGrabPointer are different to allow the mouse leaving fullscreen XBMC. LeaveNotify triggers an ungrab. I agree, this is still ugly and __NET_ACTIVE_WINDOW seems more elegant. Will you do?

I will try to. Will separate out the code that grabs keyboard and
input. Seem to work fine without it.

Is the current code broken? I have been testing with Unity (mostly 2D) and did not notice.

Yes, if you fullscreen on a Unity screen where you have the sidebar
visible, then leave and re-enter. The sidebar keeps on covering xbmc
since Unity is not getting the event that activates xbmc and hide the
sidebar.

Member

elupus commented Jul 5, 2012

Right, I started with the SDL code and changed it a bit. The parameters of XGrabPointer are different to allow the mouse leaving fullscreen XBMC. LeaveNotify triggers an ungrab. I agree, this is still ugly and __NET_ACTIVE_WINDOW seems more elegant. Will you do?

I will try to. Will separate out the code that grabs keyboard and
input. Seem to work fine without it.

Is the current code broken? I have been testing with Unity (mostly 2D) and did not notice.

Yes, if you fullscreen on a Unity screen where you have the sidebar
visible, then leave and re-enter. The sidebar keeps on covering xbmc
since Unity is not getting the event that activates xbmc and hide the
sidebar.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jul 5, 2012

Member

elupus, I have based this PR to your branch.

Member

FernetMenta commented Jul 5, 2012

elupus, I have based this PR to your branch.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 7, 2012

Member

I'll keep working on it some more i think. I have some more stuff i want to change, then I'll open a new pull request. This one has ended up rather off topic from it's original intent.

Member

elupus commented Jul 7, 2012

I'll keep working on it some more i think. I have some more stuff i want to change, then I'll open a new pull request. This one has ended up rather off topic from it's original intent.

@FernetMenta

This comment has been minimized.

Show comment Hide comment
@FernetMenta

FernetMenta Jul 7, 2012

Member

Ok. There are some issues I noticed but have not implemented yet in this PR:

Running XBMC without a WM results in a X Error message in the log.
CWinSystemX11::XErrorHandler: BadAtom, type:0, serial:54, error_code:5, request_code:18 minor_code:0

Keyrepeat is hard coded to 10ms. I think this value should be increased or made configurable.

Are you going to have a look at this? Or do you want me to send you PRs to your dropsdl branch?

Member

FernetMenta commented Jul 7, 2012

Ok. There are some issues I noticed but have not implemented yet in this PR:

Running XBMC without a WM results in a X Error message in the log.
CWinSystemX11::XErrorHandler: BadAtom, type:0, serial:54, error_code:5, request_code:18 minor_code:0

Keyrepeat is hard coded to 10ms. I think this value should be increased or made configurable.

Are you going to have a look at this? Or do you want me to send you PRs to your dropsdl branch?

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 7, 2012

Member

Hold of on those things for now. Still reworking multi display handling. I
want to keep it in line with the other architectures.

Getting messy though, so might give up and just update the other arches
instead.

Member

elupus commented Jul 7, 2012

Hold of on those things for now. Still reworking multi display handling. I
want to keep it in line with the other architectures.

Getting messy though, so might give up and just update the other arches
instead.

@elupus

This comment has been minimized.

Show comment Hide comment
@elupus

elupus Jul 17, 2012

Member

So i've tried to rework this a bit: #1175 let's continue this on that pull request since this has got a bit off topic.

Note, i'll probably force push that branch again. Some of these commit should still have your name in them since you are the majority author and we are likely to find more bugs.

Member

elupus commented Jul 17, 2012

So i've tried to rework this a bit: #1175 let's continue this on that pull request since this has got a bit off topic.

Note, i'll probably force push that branch again. Some of these commit should still have your name in them since you are the majority author and we are likely to find more bugs.

@elupus elupus closed this Jul 17, 2012

@elupus elupus referenced this pull request Sep 16, 2012

Closed

Dropsdl #1175

HolgerW1 pushed a commit to HolgerW1/xbmc that referenced this pull request Sep 26, 2014

Patrick Vos
Merge branch 'PR-848_pushalot_notifier' into development
* PR-848_pushalot_notifier:  closes gh-848
  Add Pushalot Notifier (windows phone).
  Based off PR-667 updated to current standards.  closes gh-667

HolgerW1 pushed a commit to HolgerW1/xbmc that referenced this pull request Sep 26, 2014

Patrick Vos
Merge branch 'development'
* development:

Change initial default:
naming pattern (from none to the first option),
search provider (from womble to sbi)

Fix saving rootDirs (refresh list before save)

Added notifier Pushalot. Pull #848

Minor notifiers tweaks and pep8 fixes. Pull #849
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment